[SCM] libav/experimental: libvorbis: Only drop 1-byte packets at end of stream

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:08:57 UTC 2013


The following commit has been merged in the experimental branch:
commit d99659f0b3ca873776ca7de4625534b2d8cb6c67
Author: Martin Storsjö <martin at martin.st>
Date:   Tue Jun 22 06:53:06 2010 +0000

    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
    
    Originally committed as revision 23693 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index a7044a2..5926d98 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -171,7 +171,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avccontext,
         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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list