Browse code

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@gmail.com>

Paul B Mahol authored on 2016/04/09 06:35:45
Showing 1 changed files
... ...
@@ -476,8 +476,10 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
476 476
     if (!s->got_header) {
477 477
         if ((ret = read_header(s)) < 0)
478 478
             return ret;
479
-        *got_frame_ptr = 0;
480
-        goto finish_frame;
479
+        if (avpkt->size) {
480
+            *got_frame_ptr = 0;
481
+            goto finish_frame;
482
+        }
481 483
     }
482 484
 
483 485
     /* if quit command was read previously, don't decode anything */