[MPlayer-cvslog] r36167 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Fri Apr 5 15:46:51 CEST 2013
Author: reimar
Date: Fri Apr 5 15:46:51 2013
New Revision: 36167
Log:
Detect invalid data from FFmpeg.
Fixes the crash part of bug #2135.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Fri Apr 5 14:43:11 2013 (r36166)
+++ trunk/libmpcodecs/vd_ffmpeg.c Fri Apr 5 15:46:51 2013 (r36167)
@@ -473,6 +473,10 @@ static void draw_slice(struct AVCodecCon
sh_video_t *sh = s->opaque;
uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]};
int strides[MP_MAX_PLANES] = {src->linesize[0], src->linesize[1], src->linesize[2]};
+ if (!src->data[0]) {
+ mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "BUG in FFmpeg, draw_slice called with NULL pointer!\n");
+ return;
+ }
if (height < 0)
{
int i;
More information about the MPlayer-cvslog
mailing list