1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fix handling of packet loss when the output buffer is full

Originally committed as revision 19766 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Sascha Sommer 2009-09-05 10:59:09 +00:00
parent 9244370a7c
commit bbb0bdd533

View File

@ -1461,7 +1461,8 @@ static int decode_packet(AVCodecContext *avctx,
s->samples_end = (float*)((int8_t*)data + *data_size);
*data_size = 0;
if (!s->output_buffer_full) {
if (!s->output_buffer_full || s->packet_loss) {
s->output_buffer_full = 0;
s->buf_bit_size = buf_size << 3;
/** sanity check for the buffer length */
@ -1537,7 +1538,7 @@ static int decode_packet(AVCodecContext *avctx,
*data_size = (int8_t *)s->samples - (int8_t *)data;
return (s->output_buffer_full)?0: avctx->block_align;
return (s->output_buffer_full && !s->packet_loss)?0: avctx->block_align;
}
/**