[FFmpeg-cvslog] dxa: Make sure the reference frame exists
Luca Barbato
git at videolan.org
Tue Aug 27 19:23:51 CEST 2013
ffmpeg | branch: release/1.1 | Luca Barbato <lu_zero at gentoo.org> | Wed Aug 14 16:51:53 2013 +0200| [93fbabb60f723ea66794cdad071e843720719cf4] | committer: Luca Barbato
dxa: Make sure the reference frame exists
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit 5ef7c84a9374681c64722a96d91741f3b990af2b)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
Conflicts:
libavcodec/dxa.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93fbabb60f723ea66794cdad071e843720719cf4
---
libavcodec/dxa.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 0f590f1..ddc8d98 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -256,6 +256,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
case 5:
c->pic.key_frame = !(compr & 1);
c->pic.pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
+
+ if (!tmpptr && !c->pic.key_frame) {
+ av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
for(j = 0; j < avctx->height; j++){
if(compr & 1){
for(i = 0; i < avctx->width; i++)
More information about the ffmpeg-cvslog
mailing list