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
22796042
Commit
22796042
authored
Dec 16, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: retuen the amount read in case of NAL_END_SEQUENCE
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
902c0904
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
h264.c
libavcodec/h264.c
+6
-5
No files found.
libavcodec/h264.c
View file @
22796042
...
...
@@ -4046,15 +4046,15 @@ static int decode_frame(AVCodecContext *avctx,
MpegEncContext
*
s
=
&
h
->
s
;
AVFrame
*
pict
=
data
;
int
buf_index
;
Picture
*
out
;
int
i
,
out_idx
;
s
->
flags
=
avctx
->
flags
;
s
->
flags2
=
avctx
->
flags2
;
/* end of stream, output what is still in the buffers */
out
:
if
(
buf_size
==
0
)
{
Picture
*
out
;
int
i
,
out_idx
;
out
:
s
->
current_picture_ptr
=
NULL
;
...
...
@@ -4075,7 +4075,7 @@ static int decode_frame(AVCodecContext *avctx,
*
pict
=
*
(
AVFrame
*
)
out
;
}
return
0
;
return
buf_size
;
}
if
(
h
->
is_avc
&&
buf_size
>=
9
&&
buf
[
0
]
==
1
&&
buf
[
2
]
==
0
&&
(
buf
[
4
]
&
0xFC
)
==
0xFC
&&
(
buf
[
5
]
&
0x1F
)
&&
buf
[
8
]
==
0x67
){
int
cnt
=
buf
[
5
]
&
0x1f
;
...
...
@@ -4105,7 +4105,8 @@ not_extra:
return
-
1
;
if
(
!
s
->
current_picture_ptr
&&
h
->
nal_unit_type
==
NAL_END_SEQUENCE
)
{
buf_size
=
0
;
av_assert0
(
buf_index
<=
buf_size
);
buf_size
=
buf_index
;
goto
out
;
}
...
...
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