1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

h264: Use mismatching frame numbers in fields to synchronize the

first/second field state independant of them being reference or not.
Fixes Ticket354

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-12 21:10:15 +01:00
parent 05423d3afd
commit 545ec935a4

View File

@ -2946,11 +2946,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s0->first_field = FIELD_PICTURE;
} else {
if (h->nal_ref_idc &&
s0->current_picture_ptr->f.reference &&
s0->current_picture_ptr->frame_num != h->frame_num) {
if (s0->current_picture_ptr->frame_num != h->frame_num) {
/*
* This and previous field were reference, but had
* This and previous field had
* different frame_nums. Consider this field first in
* pair. Throw away previous field except for reference
* purposes.