[FFmpeg-soc] [soc]: r3842 - dirac/libavcodec/dirac.c
conrad
subversion at mplayerhq.hu
Wed Dec 3 22:28:28 CET 2008
Author: conrad
Date: Wed Dec 3 22:28:28 2008
New Revision: 3842
Log:
Don't crash if the reference frame is missing
Modified:
dirac/libavcodec/dirac.c
Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c (original)
+++ dirac/libavcodec/dirac.c Wed Dec 3 22:28:28 2008
@@ -1126,6 +1126,10 @@ int dirac_motion_compensation(DiracConte
for (i = 0; i < s->refs; i++) {
refidx[i] = dirac_reference_frame_idx(s, s->ref[i]);
+ if (refidx[i] < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Reference frame %d not in buffer\n", s->ref[i]);
+ return -1;
+ }
ref[i] = &s->refframes[refidx[i]].frame;
if (s->refframes[refidx[i]].halfpel[comp] == NULL) {
More information about the FFmpeg-soc
mailing list