[FFmpeg-cvslog] r9032 - trunk/libavformat/dvenc.c

corey subversion
Wed May 16 04:02:22 CEST 2007


Author: corey
Date: Wed May 16 04:02:22 2007
New Revision: 9032

Log:
Don't forget about audio remaining in buffer, in case there is enough
left to make another DV frame.


Modified:
   trunk/libavformat/dvenc.c

Modified: trunk/libavformat/dvenc.c
==============================================================================
--- trunk/libavformat/dvenc.c	(original)
+++ trunk/libavformat/dvenc.c	Wed May 16 04:02:22 2007
@@ -266,13 +266,15 @@ int dv_assemble_frame(DVMuxContext *c, A
     /* Lets see if we have enough data to construct one DV frame */
     if (c->has_video == 1 && c->has_audio + 1 == 1<<c->n_ast) {
         dv_inject_metadata(c, *frame);
+        c->has_audio = 0;
         for (i=0; i<c->n_ast; i++) {
              dv_inject_audio(c, i, *frame);
              av_fifo_drain(&c->audio_data[i], reqasize);
+             c->has_audio |= ((reqasize <= av_fifo_size(&c->audio_data[i])) << i);
         }
 
         c->has_video = 0;
-        c->has_audio = 0;
+
         c->frames++;
 
         return c->sys->frame_size;




More information about the ffmpeg-cvslog mailing list