diff options
author | Mans Rullgard <mans@mansr.com> | 2011-07-17 15:27:14 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-07-17 17:10:37 +0100 |
commit | e9f98c90229999c0e654bd77af55d7020347440a (patch) | |
tree | 6a4b45ba7c4e56a47aa588bede2cf091c7903bf6 /ffmpeg.c | |
parent | e0ae2174dbbc8528008afb3549e1673dff96db4d (diff) | |
download | ffmpeg-e9f98c90229999c0e654bd77af55d7020347440a.tar.gz |
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>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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; |