diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-26 17:31:09 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-05-27 23:26:06 +0400 |
commit | 538bf767373f176b6487e30181155e74b37cced6 (patch) | |
tree | 58fc525e7231e566020acf163dcdd038be2f23b0 /avconv_opt.c | |
parent | 564b7e0c0095768cd20001b28154d69462be54e7 (diff) |
avconv: make -aspect work with streamcopy
Diffstat (limited to 'avconv_opt.c')
-rw-r--r-- | avconv_opt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/avconv_opt.c b/avconv_opt.c index ae9b72ee9d..3245709e02 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -983,15 +983,20 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc) AVStream *st; OutputStream *ost; AVCodecContext *video_enc; + char *frame_aspect_ratio = NULL; ost = new_output_stream(o, oc, AVMEDIA_TYPE_VIDEO); st = ost->st; video_enc = st->codec; + MATCH_PER_STREAM_OPT(frame_aspect_ratios, str, frame_aspect_ratio, oc, st); + if (frame_aspect_ratio) + ost->frame_aspect_ratio = parse_frame_aspect_ratio(frame_aspect_ratio); + if (!ost->stream_copy) { const char *p = NULL; char *frame_rate = NULL, *frame_size = NULL; - char *frame_aspect_ratio = NULL, *frame_pix_fmt = NULL; + char *frame_pix_fmt = NULL; char *intra_matrix = NULL, *inter_matrix = NULL; int do_pass = 0; int i; @@ -1008,10 +1013,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc) exit(1); } - MATCH_PER_STREAM_OPT(frame_aspect_ratios, str, frame_aspect_ratio, oc, st); - if (frame_aspect_ratio) - ost->frame_aspect_ratio = parse_frame_aspect_ratio(frame_aspect_ratio); - MATCH_PER_STREAM_OPT(frame_pix_fmts, str, frame_pix_fmt, oc, st); if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == AV_PIX_FMT_NONE) { av_log(NULL, AV_LOG_FATAL, "Unknown pixel format requested: %s.\n", frame_pix_fmt); |