[SCM] libav/experimental: FFplay : Avoid manipulating NULL data pointers so that future checks remain valid. This fixes segfaults for those cases where data copy to this invalid pointer is attempted.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:07:30 UTC 2013
The following commit has been merged in the experimental branch:
commit 3635c07bd1d1202e98f439f3b5389ff142d87cc3
Author: Jai Menon <jmenon86 at gmail.com>
Date: Sun May 23 19:13:17 2010 +0000
FFplay : Avoid manipulating NULL data pointers so that future checks
remain valid. This fixes segfaults for those cases where data copy to
this invalid pointer is attempted.
Originally committed as revision 23264 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/ffplay.c b/ffplay.c
index a48891e..7b20848 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1591,7 +1591,9 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
unsigned hshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w;
unsigned vshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h;
+ if (ref->data[i]) {
ref->data[i] += (edge >> hshift) + ((edge * ref->linesize[i]) >> vshift);
+ }
pic->data[i] = ref->data[i];
pic->linesize[i] = ref->linesize[i];
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list