You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
ffmpeg: avoid NULL dereference with filters.
icodec can be NULL if there is no input stream clearly associated with the output stream.
This commit is contained in:
3
ffmpeg.c
3
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;
|
||||
|
Reference in New Issue
Block a user