[FFmpeg-cvslog] ffmpeg: fix operation with --disable-avfilter

Mans Rullgard git at videolan.org
Tue Jul 26 00:53:24 CEST 2011


ffmpeg | branch: release/0.8 | Mans Rullgard <mans at mansr.com> | Sun Jul 17 15:27:14 2011 +0100| [20829cf8a26a00c840c70f12224843e079c10ee6] | committer: Reinhard Tartler

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 at mansr.com>
(cherry picked from commit e9f98c90229999c0e654bd77af55d7020347440a)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20829cf8a26a00c840c70f12224843e079c10ee6
---

 ffmpeg.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 2ed2802..c1db3d5 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;



More information about the ffmpeg-cvslog mailing list