summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-04-08 23:35:45 +0200
committerPaul B Mahol <onemda@gmail.com>2016-04-08 23:45:09 +0200
commitdee138624fdf0997a46f04672f0ec50782403e45 (patch)
tree62de7454a2331f6f93c4468b87f69772e1510df5
parentc18fdc86928e0b40bb634a8d8ca071270fcac2d2 (diff)
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>
-rw-r--r--libavcodec/shorten.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 9de6bd1c2d..0dc879a58c 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 */