[FFmpeg-cvslog] r18474 - trunk/libavcodec/h264.c

michael subversion
Sun Apr 12 22:43:52 CEST 2009


Author: michael
Date: Sun Apr 12 22:43:52 2009
New Revision: 18474

Log:
Fix 2 access units in a packet mp4s.
Fixes issue944 and possibly others.

Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Sun Apr 12 22:40:18 2009	(r18473)
+++ trunk/libavcodec/h264.c	Sun Apr 12 22:43:52 2009	(r18474)
@@ -3660,6 +3660,8 @@ static void field_end(H264Context *h){
         ff_er_frame_end(s);
 
     MPV_frame_end(s);
+
+    h->current_slice=0;
 }
 
 /**
@@ -3720,7 +3722,11 @@ static int decode_slice_header(H264Conte
 
     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;



More information about the ffmpeg-cvslog mailing list