提交 d99659f0 编写于 作者: M Martin Storsjö

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
上级 5634f30c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册