# HG changeset patch # User mstorsjo # Date 1277189586 0 # Node ID defe337cf643c99d51fdc67146880aac869d6b6d # Parent a1b4029b24651f51708866dd1b244bef3b1e694d 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 diff -r a1b4029b2465 -r defe337cf643 libvorbis.c --- a/libvorbis.c Mon Jun 21 17:01:22 2010 +0000 +++ b/libvorbis.c Tue Jun 22 06:53:06 2010 +0000 @@ -171,7 +171,7 @@ 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);