From 7fd10f66b722eccc2ada9128766d002f6d751f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 18 Nov 2014 14:28:50 +0200 Subject: [PATCH] hdsenc: Clear the previous codec tag when setting up the chained muxer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chained flv muxer wants one set of tags - normally this set could be signaled via the AVOutputFormat codec_tag field (as smoothstreamingenc and dashenc do). hdsenc doesn't signal it, since the FLV codec tag arrays aren't exported from flvenc.c. This can lead to the caller keeping an original codec tag from the originating container here, which would then be a mismatch for the FLV muxer. Since we don't really care about what codec tag the caller might have set, just clear it and let the lavf muxer layer set the right one for the chained FLV muxer later instead. Signed-off-by: Martin Storsjö --- libavformat/hdsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 012de60b1f..d96a3d5599 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -395,6 +395,7 @@ static int hds_write_header(AVFormatContext *s) goto fail; } avcodec_copy_context(st->codec, s->streams[i]->codec); + st->codec->codec_tag = 0; st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio; st->time_base = s->streams[i]->time_base; }