Commit 8e2d0855 authored by Anton Khirnov's avatar Anton Khirnov

ffmpeg: do not set GLOBAL_HEADER flag in the options context

The removed lines have no effect, since the flag is set on all encoder
for the given file and avcodec_opts are reset between files.
parent b5849f77
...@@ -3463,7 +3463,6 @@ static void new_video_stream(AVFormatContext *oc, int file_idx) ...@@ -3463,7 +3463,6 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
if(oc->oformat->flags & AVFMT_GLOBALHEADER) { if(oc->oformat->flags & AVFMT_GLOBALHEADER) {
video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
} }
if (video_stream_copy) { if (video_stream_copy) {
...@@ -3589,7 +3588,6 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx) ...@@ -3589,7 +3588,6 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx)
if (oc->oformat->flags & AVFMT_GLOBALHEADER) { if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
avcodec_opts[AVMEDIA_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
} }
if (audio_stream_copy) { if (audio_stream_copy) {
st->stream_copy = 1; st->stream_copy = 1;
...@@ -3640,7 +3638,6 @@ static void new_data_stream(AVFormatContext *oc, int file_idx) ...@@ -3640,7 +3638,6 @@ static void new_data_stream(AVFormatContext *oc, int file_idx)
if (oc->oformat->flags & AVFMT_GLOBALHEADER) { if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
data_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; data_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
avcodec_opts[AVMEDIA_TYPE_DATA]->flags |= CODEC_FLAG_GLOBAL_HEADER;
} }
if (data_stream_copy) { if (data_stream_copy) {
st->stream_copy = 1; st->stream_copy = 1;
...@@ -3683,7 +3680,6 @@ static void new_subtitle_stream(AVFormatContext *oc, int file_idx) ...@@ -3683,7 +3680,6 @@ static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
if (oc->oformat->flags & AVFMT_GLOBALHEADER) { if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
subtitle_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; subtitle_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->flags |= CODEC_FLAG_GLOBAL_HEADER;
} }
if (subtitle_stream_copy) { if (subtitle_stream_copy) {
st->stream_copy = 1; st->stream_copy = 1;
......
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