Mercurial > mplayer.hg
diff libmpcodecs/vd_ffmpeg.c @ 36073:01f4eea55d75
Detect invalid data from FFmpeg.
Fixes the crash part of bug #2135.
author | reimar |
---|---|
date | Fri, 05 Apr 2013 13:46:51 +0000 |
parents | 389d43c448b3 |
children | b14ea6320969 |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Fri Apr 05 12:43:11 2013 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Fri Apr 05 13:46:51 2013 +0000 @@ -473,6 +473,10 @@ 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;