[FFmpeg-cvslog] r23693 - trunk/libavcodec/libvorbis.c

mstorsjo subversion
Tue Jun 22 08:53:06 CEST 2010


Author: mstorsjo
Date: Tue Jun 22 08:53:06 2010
New Revision: 23693

Log:
libvorbis: Only drop 1-byte packets at end of stream

This fixes handling of totally silent packets during the encoding, that
also are 1 byte in size.

This fixes issue 2013

Modified:
   trunk/libavcodec/libvorbis.c

Modified: trunk/libavcodec/libvorbis.c
==============================================================================
--- trunk/libavcodec/libvorbis.c	Tue Jun 22 08:45:05 2010	(r23692)
+++ trunk/libavcodec/libvorbis.c	Tue Jun 22 08:53:06 2010	(r23693)
@@ -171,7 +171,7 @@ static int oggvorbis_encode_frame(AVCode
         while(vorbis_bitrate_flushpacket(&context->vd, &op)) {
             /* i'd love to say the following line is a hack, but sadly it's
              * not, apparently the end of stream decision is in libogg. */
-            if(op.bytes==1)
+            if(op.bytes==1 && op.e_o_s)
                 continue;
             memcpy(context->buffer + context->buffer_index, &op, sizeof(ogg_packet));
             context->buffer_index += sizeof(ogg_packet);



More information about the ffmpeg-cvslog mailing list