[FFmpeg-cvslog] diracdec: Use only one frame per reference

Michael Niedermayer git at videolan.org
Sun Nov 11 16:44:54 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 11 16:36:27 2012 +0100| [0a4087b8930d283aeec0aaf15d9991b6b1765597] | committer: Michael Niedermayer

diracdec: Use only one frame per reference

Prevents null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a4087b8930d283aeec0aaf15d9991b6b1765597
---

 libavcodec/diracdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 3d42a9d..c70a0c7 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1665,6 +1665,7 @@ static int dirac_decode_picture_header(DiracContext *s)
                 if (!s->all_frames[j].avframe.data[0]) {
                     s->ref_pics[i] = &s->all_frames[j];
                     s->avctx->get_buffer(s->avctx, &s->ref_pics[i]->avframe);
+                    break;
                 }
     }
 



More information about the ffmpeg-cvslog mailing list