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
98c5db89
Commit
98c5db89
authored
Apr 04, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/h264_slice: make current_slice reset code more strict
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
514d9bb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
h264_slice.c
libavcodec/h264_slice.c
+13
-3
No files found.
libavcodec/h264_slice.c
View file @
98c5db89
...
@@ -1206,11 +1206,21 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
...
@@ -1206,11 +1206,21 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
first_mb_in_slice
=
get_ue_golomb_long
(
&
sl
->
gb
);
first_mb_in_slice
=
get_ue_golomb_long
(
&
sl
->
gb
);
if
(
first_mb_in_slice
==
0
)
{
// FIXME better field boundary detection
if
(
first_mb_in_slice
==
0
)
{
// FIXME better field boundary detection
if
(
h
->
current_slice
&&
h
->
cur_pic_ptr
&&
FIELD_PICTURE
(
h
))
{
if
(
h
->
current_slice
)
{
ff_h264_field_end
(
h
,
sl
,
1
);
if
(
h
->
cur_pic_ptr
&&
FIELD_PICTURE
(
h
)
&&
h
->
first_field
)
{
ff_h264_field_end
(
h
,
sl
,
1
);
h
->
current_slice
=
0
;
}
else
if
(
h
->
cur_pic_ptr
&&
!
FIELD_PICTURE
(
h
)
&&
!
h
->
first_field
&&
h
->
nal_unit_type
==
NAL_IDR_SLICE
)
{
av_log
(
h
,
AV_LOG_WARNING
,
"Broken frame packetizing
\n
"
);
ff_h264_field_end
(
h
,
sl
,
1
);
h
->
current_slice
=
0
;
ff_thread_report_progress
(
&
h
->
cur_pic_ptr
->
tf
,
INT_MAX
,
0
);
ff_thread_report_progress
(
&
h
->
cur_pic_ptr
->
tf
,
INT_MAX
,
1
);
h
->
cur_pic_ptr
=
NULL
;
}
else
return
AVERROR_INVALIDDATA
;
}
}
h
->
current_slice
=
0
;
if
(
!
h
->
first_field
)
{
if
(
!
h
->
first_field
)
{
if
(
h
->
cur_pic_ptr
&&
!
h
->
droppable
)
{
if
(
h
->
cur_pic_ptr
&&
!
h
->
droppable
)
{
ff_thread_report_progress
(
&
h
->
cur_pic_ptr
->
tf
,
INT_MAX
,
ff_thread_report_progress
(
&
h
->
cur_pic_ptr
->
tf
,
INT_MAX
,
...
...
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