changeset 5878:6c962a4004a1 libavcodec

Fix poc for field pictures. Prior to this, the poc of the second field in decoding order would always be assigned to a field pair's poc. Original thread: H.264: Fix poc for field pairs, 6 Nov 2007 17:41:02
author heydowns
date Tue, 06 Nov 2007 18:48:18 +0000
parents aea495619138
children ad73103623ab
files h264.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Tue Nov 06 13:08:04 2007 +0000
+++ b/h264.c	Tue Nov 06 18:48:18 2007 +0000
@@ -3767,8 +3767,10 @@
         s->current_picture_ptr->field_poc[1]= field_poc[1];
         s->current_picture_ptr->poc = field_poc[1];
     }
-    if(!FIELD_PICTURE || !s->first_field)
-        s->current_picture_ptr->poc= FFMIN(field_poc[0], field_poc[1]);
+    if(!FIELD_PICTURE || !s->first_field) {
+        Picture *cur = s->current_picture_ptr;
+        cur->poc= FFMIN(cur->field_poc[0], cur->field_poc[1]);
+    }
 
     return 0;
 }