diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-07-03 11:34:33 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-07-03 13:06:23 +0000 |
commit | 1bc9e4c5b27ee07a9e7e1f60e8ec355027f66f64 (patch) | |
tree | 43d4cee8d9dd4e4e0258d17c145a33b48a6bfacd /libavcodec/jvdec.c | |
parent | 1c638cfc25fdba1369ebd16aa7c8393a73ef9801 (diff) | |
download | ffmpeg-1bc9e4c5b27ee07a9e7e1f60e8ec355027f66f64.tar.gz |
jvdec: remove buf_size
It is same as avpkt->size.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/jvdec.c')
-rw-r--r-- | libavcodec/jvdec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index acf1885611..8acd50a45c 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -133,9 +133,8 @@ static int decode_frame(AVCodecContext *avctx, AVPacket *avpkt) { JvContext *s = avctx->priv_data; - int buf_size = avpkt->size; const uint8_t *buf = avpkt->data; - const uint8_t *buf_end = buf + buf_size; + const uint8_t *buf_end = buf + avpkt->size; int video_size, video_type, i, j; video_size = AV_RL32(buf); @@ -143,7 +142,7 @@ static int decode_frame(AVCodecContext *avctx, buf += 5; if (video_size) { - if(video_size < 0 || video_size > buf_size) { + if (video_size < 0 || video_size > avpkt->size) { av_log(avctx, AV_LOG_ERROR, "video size %d invalid\n", video_size); return AVERROR_INVALIDDATA; } @@ -194,7 +193,7 @@ static int decode_frame(AVCodecContext *avctx, *(AVFrame*)data = s->frame; } - return buf_size; + return avpkt->size; } static av_cold int decode_close(AVCodecContext *avctx) |