Commit 6c9eac19 authored by Anton Khirnov's avatar 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.
parent e77c8662
...@@ -561,7 +561,6 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost) ...@@ -561,7 +561,6 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost)
AVFilterContext *last_filter, *filter; AVFilterContext *last_filter, *filter;
/** filter graph containing all filters including input & output */ /** filter graph containing all filters including input & output */
AVCodecContext *codec = ost->st->codec; AVCodecContext *codec = ost->st->codec;
AVCodecContext *icodec = ist->st->codec;
SinkContext sink_ctx = { .pix_fmts = choose_pixel_fmts(ost) }; SinkContext sink_ctx = { .pix_fmts = choose_pixel_fmts(ost) };
AVRational sample_aspect_ratio; AVRational sample_aspect_ratio;
char args[255]; char args[255];
...@@ -588,7 +587,7 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost) ...@@ -588,7 +587,7 @@ static int configure_video_filters(InputStream *ist, OutputStream *ost)
return ret; return ret;
last_filter = ost->input_video_filter; 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", snprintf(args, 255, "%d:%d:flags=0x%X",
codec->width, codec->width,
codec->height, codec->height,
...@@ -2389,11 +2388,6 @@ static int transcode_init(void) ...@@ -2389,11 +2388,6 @@ static int transcode_init(void)
ost->resample_channels = icodec->channels; ost->resample_channels = icodec->channels;
break; break;
case AVMEDIA_TYPE_VIDEO: 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: * We want CFR output if and only if one of those is true:
* 1) user specified output framerate with -r * 1) user specified output framerate with -r
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment