Mercurial > libavcodec.hg
changeset 10130:c2d08aedeeed libavcodec
fix handling of packet loss when the output buffer is full
author | faust3 |
---|---|
date | Sat, 05 Sep 2009 10:59:09 +0000 |
parents | 0ffe220e1c80 |
children | 4f974b8d8851 |
files | wmaprodec.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/wmaprodec.c Sat Sep 05 10:18:23 2009 +0000 +++ b/wmaprodec.c Sat Sep 05 10:59:09 2009 +0000 @@ -1461,7 +1461,8 @@ 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 @@ *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; } /**