--- avconv.c | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/avconv.c b/avconv.c index c7a5c71..ed796a0 100644 --- a/avconv.c +++ b/avconv.c @@ -2976,6 +2976,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e st->codec->global_quality = FF_QP2LAMBDA * qscale; } + if (oc->oformat->flags & AVFMT_GLOBALHEADER) + st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; + ost->sws_flags = av_get_int(sws_opts, "sws_flags", NULL); return ost; } @@ -3007,10 +3010,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc) st = ost->st; video_enc = st->codec; - if(oc->oformat->flags & AVFMT_GLOBALHEADER) { - video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - } - if (!st->stream_copy) { const char *p = NULL; char *forced_key_frames = NULL, *frame_rate = NULL, *frame_size = NULL; @@ -3128,9 +3127,6 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc) audio_enc = st->codec; audio_enc->codec_type = AVMEDIA_TYPE_AUDIO; - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { - audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - } if (!st->stream_copy) { char *sample_fmt = NULL; @@ -3163,10 +3159,6 @@ static OutputStream *new_data_stream(OptionsContext *o, AVFormatContext *oc) exit_program(1); } - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { - data_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - } - return ost; } @@ -3182,10 +3174,6 @@ static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc) subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE; - if (oc->oformat->flags & AVFMT_GLOBALHEADER) { - subtitle_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - } - return ost; } -- 1.7.6 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel