]> git.sesse.net Git - ffmpeg/commitdiff
h264: Use mismatching frame numbers in fields to synchronize the
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Nov 2011 20:10:15 +0000 (21:10 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Nov 2011 00:27:18 +0000 (01:27 +0100)
 first/second field state independant of them being reference or not.
Fixes Ticket354

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index 77db8ef7dc53e9d1534cbdca4ba42481629b9ea1..3ec8b85f8f9ae14327944a2be5a3dfe446a204a6 100644 (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.