[FFmpeg-cvslog] r23197 - trunk/libavcodec/libx264.c

bcoudurier subversion
Wed May 19 22:48:29 CEST 2010


Author: bcoudurier
Date: Wed May 19 22:48:29 2010
New Revision: 23197

Log:
fix x264 encoding when delay is > number of input frames

Modified:
   trunk/libavcodec/libx264.c

Modified: trunk/libavcodec/libx264.c
==============================================================================
--- trunk/libavcodec/libx264.c	Wed May 19 22:18:40 2010	(r23196)
+++ trunk/libavcodec/libx264.c	Wed May 19 22:48:29 2010	(r23197)
@@ -102,12 +102,14 @@ static int X264_frame(AVCodecContext *ct
         x4->pic.i_type = X264_TYPE_AUTO;
     }
 
+    do {
     if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL, &pic_out) < 0)
         return -1;
 
     bufsize = encode_nals(ctx, buf, bufsize, nal, nnal, 0);
     if (bufsize < 0)
         return -1;
+    } while (!bufsize && !frame && x264_encoder_delayed_frames(x4->enc));
 
     /* FIXME: libx264 now provides DTS, but AVFrame doesn't have a field for it. */
     x4->out_pic.pts = pic_out.i_pts;



More information about the ffmpeg-cvslog mailing list