Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ce19aec1
Commit
ce19aec1
authored
Oct 09, 2012
by
Anuj Mittal
Committed by
Michael Niedermayer
Oct 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check resync marker only when enabled.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ef9fe5be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
h263.h
libavcodec/h263.h
+1
-1
h263dec.c
libavcodec/h263dec.c
+1
-1
ituh263dec.c
libavcodec/ituh263dec.c
+7
-5
No files found.
libavcodec/h263.h
View file @
ce19aec1
...
...
@@ -110,7 +110,7 @@ int av_const h263_get_picture_format(int width, int height);
void
ff_clean_h263_qscales
(
MpegEncContext
*
s
);
int
ff_h263_resync
(
MpegEncContext
*
s
);
const
uint8_t
*
ff_h263_find_resync_marker
(
const
uint8_t
*
p
,
const
uint8_t
*
end
);
const
uint8_t
*
ff_h263_find_resync_marker
(
MpegEncContext
*
s
,
const
uint8_t
*
p
,
const
uint8_t
*
end
);
int
ff_h263_get_gob_height
(
MpegEncContext
*
s
);
void
ff_h263_encode_motion
(
MpegEncContext
*
s
,
int
val
,
int
f_code
);
...
...
libavcodec/h263dec.c
View file @
ce19aec1
...
...
@@ -170,7 +170,7 @@ static int decode_slice(MpegEncContext *s){
if
(
s
->
avctx
->
hwaccel
)
{
const
uint8_t
*
start
=
s
->
gb
.
buffer
+
get_bits_count
(
&
s
->
gb
)
/
8
;
const
uint8_t
*
end
=
ff_h263_find_resync_marker
(
start
+
1
,
s
->
gb
.
buffer_end
);
const
uint8_t
*
end
=
ff_h263_find_resync_marker
(
s
,
s
tart
+
1
,
s
->
gb
.
buffer_end
);
skip_bits_long
(
&
s
->
gb
,
8
*
(
end
-
start
));
return
s
->
avctx
->
hwaccel
->
decode_slice
(
s
->
avctx
,
start
,
end
-
start
);
}
...
...
libavcodec/ituh263dec.c
View file @
ce19aec1
...
...
@@ -207,16 +207,18 @@ static int h263_decode_gob_header(MpegEncContext *s)
* @param end pointer to the end of the buffer
* @return pointer to the next resync_marker, or end if none was found
*/
const
uint8_t
*
ff_h263_find_resync_marker
(
const
uint8_t
*
av_restrict
p
,
const
uint8_t
*
av_restrict
end
)
const
uint8_t
*
ff_h263_find_resync_marker
(
MpegEncContext
*
s
,
const
uint8_t
*
av_restrict
p
,
const
uint8_t
*
av_restrict
end
)
{
av_assert2
(
p
<
end
);
end
-=
2
;
p
++
;
for
(;
p
<
end
;
p
+=
2
){
if
(
!*
p
){
if
(
!
p
[
-
1
]
&&
p
[
1
])
return
p
-
1
;
else
if
(
!
p
[
1
]
&&
p
[
2
])
return
p
;
if
(
s
->
resync_marker
){
for
(;
p
<
end
;
p
+=
2
){
if
(
!*
p
){
if
(
!
p
[
-
1
]
&&
p
[
1
])
return
p
-
1
;
else
if
(
!
p
[
1
]
&&
p
[
2
])
return
p
;
}
}
}
return
end
+
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment