[FFmpeg-cvslog] pictordec: pass correct context to avpriv_request_sample
Anton Khirnov
git at videolan.org
Mon Nov 4 19:16:43 CET 2013
ffmpeg | branch: release/0.10 | Anton Khirnov <anton at khirnov.net> | Sat Aug 24 21:30:46 2013 +0200| [82978539171f32d0e1cf3bb4b452de4c1a920bae] | committer: Luca Barbato
pictordec: pass correct context to avpriv_request_sample
Fixes invalid reads.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry-picked from commit fe9bb61f9a16be19ad91875632c39e44b7a99a8a)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
Conflicts:
libavcodec/pictordec.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82978539171f32d0e1cf3bb4b452de4c1a920bae
---
libavcodec/pictordec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 88add16..6f2193d 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx,
s->nb_planes = (tmp >> 4) + 1;
bpp = bits_per_plane * s->nb_planes;
if (bits_per_plane > 8 || bpp < 1 || bpp > 32) {
- av_log_ask_for_sample(s, "unsupported bit depth\n");
+ av_log_ask_for_sample(avctx, "unsupported bit depth\n");
return AVERROR_INVALIDDATA;
}
@@ -233,7 +233,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
} else {
- av_log_ask_for_sample(s, "uncompressed image\n");
+ av_log_ask_for_sample(avctx, "uncompressed image\n");
return avpkt->size;
}
finish:
More information about the ffmpeg-cvslog
mailing list