avcodec/wmalosslessdec: fix data flushing at the end

Fixes ffplay -autoexit
Fixes Ticket3000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-25 01:09:59 +02:00
parent 29ffeef5e7
commit 4fb14f8492
1 changed files with 2 additions and 0 deletions

View File

@ -1182,6 +1182,8 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
if (s->packet_done || s->packet_loss) {
s->packet_done = 0;
if (!buf_size)
return 0;
/* sanity check for the buffer length */
if (buf_size < avctx->block_align) {
av_log(avctx, AV_LOG_ERROR, "buf size %d invalid\n", buf_size);