[FFmpeg-cvslog] r23264 - trunk/ffplay.c
jai_menon
subversion
Sun May 23 21:13:17 CEST 2010
Author: jai_menon
Date: Sun May 23 21:13:17 2010
New Revision: 23264
Log:
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.
Modified:
trunk/ffplay.c
Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c Sun May 23 21:12:27 2010 (r23263)
+++ trunk/ffplay.c Sun May 23 21:13:17 2010 (r23264)
@@ -1591,7 +1591,9 @@ static int input_get_buffer(AVCodecConte
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];
}
More information about the ffmpeg-cvslog
mailing list