avcodec/wmalosslessdec: fix data flushing at the end
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Oct 2013 23:09:59 +0000 (01:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Oct 2013 23:09:59 +0000 (01:09 +0200)
Fixes ffplay -autoexit
Fixes Ticket3000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmalosslessdec.c

index 21b4f91..7a80248 100644 (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);