aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-15 20:09:48 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-15 22:12:48 +0100
commitc869e00f881019fa0eaf40874f92e2566b9a0410 (patch)
tree69a37a5c342efc357b18d7a44740d7cf1f3c7444
parent0888c5a24273be1d449ec5f6ee216567d846a4a4 (diff)
downloadffmpeg-c869e00f881019fa0eaf40874f92e2566b9a0410.tar.gz
avcodec/smvjpegdec: return the packet size instead of 0
Most decoders return the amount of data used. This is more consistent Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/smvjpegdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c
index e319e5781b..018e135b30 100644
--- a/libavcodec/smvjpegdec.c
+++ b/libavcodec/smvjpegdec.c
@@ -200,9 +200,11 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz
s->picture[1]->linesize[i] = mjpeg_data->linesize[i];
ret = av_frame_ref(data, s->picture[1]);
+ if (ret < 0)
+ return ret;
}
- return ret;
+ return avpkt->size;
}
static const AVClass smvjpegdec_class = {