properly set *data_size when returning >= 0 values in shorten_decode_frame()
authorAurelien Jacobs <aurel@gnuage.org>
Mon, 26 Mar 2007 00:00:43 +0000 (00:00 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Mon, 26 Mar 2007 00:00:43 +0000 (00:00 +0000)
Original thread:
Date: Sat, 24 Mar 2007 04:04:53 +0100
Subject: [Ffmpeg-devel] Shorten file playback broken in SVN trunk

Originally committed as revision 8523 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/shorten.c

index 5aea1e1..efb48b5 100644 (file)
@@ -294,6 +294,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
 
         if(buf_size < s->max_framesize){
             //dprintf(avctx, "wanna more data ... %d\n", buf_size);
+            *data_size = 0;
             return input_buf_size;
         }
     }
@@ -471,6 +472,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
                 s->blocksize = get_uint(s, av_log2(s->blocksize));
                 break;
             case FN_QUIT:
+                *data_size = 0;
                 return buf_size;
                 break;
             default: