aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-05-23 21:19:16 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-06-03 23:43:57 +0200
commit48b5bcb3dd42bb0018850f41f7e090418e1b0dfb (patch)
treec83067f5f67eadd35da592ef559683a57fbdad52
parenteb7efc126aed1947edcba81c2d1a9bf776206f5c (diff)
downloadffmpeg-48b5bcb3dd42bb0018850f41f7e090418e1b0dfb.tar.gz
ffmpeg: avoid NULL dereference with filters.
icodec can be NULL if there is no input stream clearly associated with the output stream.
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 56c961b9e0..b226779d63 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3103,7 +3103,8 @@ static int transcode_init(void)
ost->filter->filter->inputs[0]->sample_aspect_ratio;
codec->pix_fmt = ost->filter->filter->inputs[0]->format;
- if (codec->width != icodec->width ||
+ if (!icodec ||
+ codec->width != icodec->width ||
codec->height != icodec->height ||
codec->pix_fmt != icodec->pix_fmt) {
codec->bits_per_raw_sample = frame_bits_per_raw_sample;