[FFmpeg-cvslog] avcodec/shorten: fix decoding of files with number of samples lower than max_frame_size

Paul B Mahol git at videolan.org
Fri Apr 8 23:47:34 CEST 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Apr  8 23:35:45 2016 +0200| [dee138624fdf0997a46f04672f0ec50782403e45] | committer: Paul B Mahol

avcodec/shorten: fix decoding of files with number of samples lower than max_frame_size

Note that support of very big block sizes is not currently supported at all due
too flawed logic in decoder.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavcodec/shorten.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 9de6bd1..0dc879a 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -476,8 +476,10 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
     if (!s->got_header) {
         if ((ret = read_header(s)) < 0)
             return ret;
-        *got_frame_ptr = 0;
-        goto finish_frame;
+        if (avpkt->size) {
+            *got_frame_ptr = 0;
+            goto finish_frame;
+        }
     }
 
     /* if quit command was read previously, don't decode anything */



More information about the ffmpeg-cvslog mailing list