[FFmpeg-cvslog] avconv: don't set output width/height directly from input value.

Anton Khirnov git at videolan.org
Tue Apr 17 04:51:56 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Mar 29 07:48:27 2012 +0200| [6c9eac19988fb85d9bf911e20e9675d814ab10dd] | committer: Anton Khirnov

avconv: don't set output width/height directly from input value.

Always take it from lavfi. This way we don't need a clearly defined
corresponding input stream.

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

 avconv.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/avconv.c b/avconv.c
index a516fb7..c343ef0 100644
--- a/avconv.c
+++ b/avconv.c
@@ -561,7 +561,6 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost)
     AVFilterContext *last_filter, *filter;
     /** filter graph containing all filters including input & output */
     AVCodecContext *codec = ost->st->codec;
-    AVCodecContext *icodec = ist->st->codec;
     SinkContext sink_ctx = { .pix_fmts = choose_pixel_fmts(ost) };
     AVRational sample_aspect_ratio;
     char args[255];
@@ -588,7 +587,7 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost)
         return ret;
     last_filter = ost->input_video_filter;
 
-    if (codec->width != icodec->width || codec->height != icodec->height) {
+    if (codec->width || codec->height) {
         snprintf(args, 255, "%d:%d:flags=0x%X",
                  codec->width,
                  codec->height,
@@ -2389,11 +2388,6 @@ static int transcode_init(void)
                 ost->resample_channels    = icodec->channels;
                 break;
             case AVMEDIA_TYPE_VIDEO:
-                if (!codec->width || !codec->height) {
-                    codec->width  = icodec->width;
-                    codec->height = icodec->height;
-                }
-
                 /*
                  * We want CFR output if and only if one of those is true:
                  * 1) user specified output framerate with -r



More information about the ffmpeg-cvslog mailing list