Mercurial > libavcodec.hg
changeset 11907:defe337cf643 libavcodec
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
author | mstorsjo |
---|---|
date | Tue, 22 Jun 2010 06:53:06 +0000 |
parents | a1b4029b2465 |
children | 9b1095b2616a |
files | libvorbis.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);