mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-08 21:48:20 +00:00
avcodec/h264_slice: do not skip 2nd field if first was not skipped
Found-by: John Högberg <john.hogberg@ericsson.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9c41126e1b
commit
accc91642b
@ -1212,6 +1212,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (h->current_slice == 0 && !h->first_field) {
|
||||
if (
|
||||
(h->avctx->skip_frame >= AVDISCARD_NONREF && !h->nal_ref_idc) ||
|
||||
(h->avctx->skip_frame >= AVDISCARD_BIDIR && sl->slice_type_nos == AV_PICTURE_TYPE_B) ||
|
||||
@ -1220,6 +1221,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
|
||||
h->avctx->skip_frame >= AVDISCARD_ALL) {
|
||||
return SLICE_SKIPED;
|
||||
}
|
||||
}
|
||||
|
||||
// to make a few old functions happy, it's wrong though
|
||||
if (!h->setup_finished)
|
||||
|
Loading…
Reference in New Issue
Block a user