[FFmpeg-cvslog] avcodec/wmalosslessdec: fix data flushing at the end

Michael Niedermayer git at videolan.org
Fri Oct 25 01:23:41 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 25 01:09:59 2013 +0200| [4fb14f84926ebcf88222e2251f4b8141d6bec465] | committer: Michael Niedermayer

avcodec/wmalosslessdec: fix data flushing at the end

Fixes ffplay -autoexit
Fixes Ticket3000

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fb14f84926ebcf88222e2251f4b8141d6bec465
---

 libavcodec/wmalosslessdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 21b4f91..7a80248 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -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);



More information about the ffmpeg-cvslog mailing list