Commit 20829cf8 authored by Mans Rullgard's avatar Mans Rullgard Committed by Reinhard Tartler
Browse files

ffmpeg: fix operation with --disable-avfilter


The width and height must be copied from the input before
being used.
Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
(cherry picked from commit e9f98c90)
Showing with 7 additions and 4 deletions
+7 -4
......@@ -2206,6 +2206,12 @@ static int transcode(AVFormatContext **output_files,
fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n");
ffmpeg_exit(1);
}
if (!codec->width || !codec->height) {
codec->width = icodec->width;
codec->height = icodec->height;
}
ost->video_resample = codec->width != icodec->width ||
codec->height != icodec->height ||
codec->pix_fmt != icodec->pix_fmt;
......@@ -2232,10 +2238,7 @@ static int transcode(AVFormatContext **output_files,
#endif
codec->bits_per_raw_sample= 0;
}
if (!codec->width || !codec->height) {
codec->width = icodec->width;
codec->height = icodec->height;
}
ost->resample_height = icodec->height;
ost->resample_width = icodec->width;
ost->resample_pix_fmt= icodec->pix_fmt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment