diff options
author | Sascha Sommer <saschasommer@freenet.de> | 2009-09-05 14:59:09 +0400 |
---|---|---|
committer | Sascha Sommer <saschasommer@freenet.de> | 2009-09-05 14:59:09 +0400 |
commit | bbb0bdd533d0f47c658133f0a5530e0de2f7b762 (patch) | |
tree | dfb2df61943128a82d0fff7defea0990dfabe3c9 /libavcodec/wmaprodec.c | |
parent | 9244370a7c95f86f9665340b4a5a2be97bde7db3 (diff) |
fix handling of packet loss when the output buffer is full
Originally committed as revision 19766 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r-- | libavcodec/wmaprodec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 62f6d12c95..886ff45670 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -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; } /** |