mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
ffmpeg: fix operation with --disable-avfilter
The width and height must be copied from the input before being used. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
e0ae2174db
commit
e9f98c9022
11
ffmpeg.c
11
ffmpeg.c
@ -2219,6 +2219,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;
|
||||
@ -2245,10 +2251,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;
|
||||
|
Loading…
Reference in New Issue
Block a user