diff mbox

[FFmpeg-devel,3/3] lavf/dashenc: unset codec_tag when it doesn't match the underlying muxer

Message ID 20170926195500.88129-3-rodger.combs@gmail.com
State Withdrawn, archived
Headers show

Commit Message

Rodger Combs Sept. 26, 2017, 7:55 p.m. UTC
---
 libavformat/dashenc.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 7ed48905f5..3a4b6478d1 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -763,6 +763,11 @@  static int dash_init(AVFormatContext *s)
         ctx->avoid_negative_ts = s->avoid_negative_ts;
         ctx->flags = s->flags;
 
+        if (ctx->oformat->codec_tag &&
+            av_codec_get_id (ctx->oformat->codec_tag, st->codecpar->codec_tag) != st->codecpar->codec_id &&
+            av_codec_get_tag(ctx->oformat->codec_tag, st->codecpar->codec_id) != 0)
+            st->codecpar->codec_tag = 0;
+
         if ((ret = avio_open_dyn_buf(&ctx->pb)) < 0)
             return ret;