aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-07-17 15:27:14 +0100
committerReinhard Tartler <siretart@tauware.de>2011-07-21 09:08:00 +0200
commit20829cf8a26a00c840c70f12224843e079c10ee6 (patch)
tree25c4a957b00a1a45e3ba6ca35d6c79e041381411
parent0b4840af0c42f96e6057ec56919f16f7fbcae3d9 (diff)
downloadffmpeg-20829cf8a26a00c840c70f12224843e079c10ee6.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> (cherry picked from commit e9f98c90229999c0e654bd77af55d7020347440a)
-rw-r--r--ffmpeg.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2ed2802333..c1db3d5679 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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;