changeset 9419:f2f83796f07b libavcodec

Fix 2 access units in a packet mp4s. Fixes issue944 and possibly others.
author michael
date Sun, 12 Apr 2009 20:43:52 +0000
parents 95f37e7d10cd
children 5b68d22e5ec9
files h264.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Sun Apr 12 20:40:18 2009 +0000
+++ b/h264.c	Sun Apr 12 20:43:52 2009 +0000
@@ -3660,6 +3660,8 @@
         ff_er_frame_end(s);
 
     MPV_frame_end(s);
+
+    h->current_slice=0;
 }
 
 /**
@@ -3720,7 +3722,11 @@
 
     first_mb_in_slice= get_ue_golomb(&s->gb);
 
-    if((s->flags2 & CODEC_FLAG2_CHUNKS) && first_mb_in_slice == 0){
+    if(first_mb_in_slice == 0){ //FIXME better field boundary detection
+        if(h0->current_slice && FIELD_PICTURE){
+            field_end(h);
+        }
+
         h0->current_slice = 0;
         if (!s0->first_field)
             s->current_picture_ptr= NULL;