ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Thu Dec 15 20:09:48 2016 +0100| [c869e00f881019fa0eaf40874f92e2566b9a0410] | committer: Michael Niedermayer
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c869e00f881019fa0eaf40874f92e2566b9a0410 --- libavcodec/smvjpegdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index e319e57..018e135 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 = { _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
