[FFmpeg-cvslog] hdsenc: Clear the previous codec tag when setting up the chained muxer

Martin Storsjö git at videolan.org
Wed Nov 19 20:35:50 CET 2014


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Nov 18 14:28:50 2014 +0200| [7fd10f66b722eccc2ada9128766d002f6d751f79] | committer: Martin Storsjö

hdsenc: Clear the previous codec tag when setting up the chained muxer

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ö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fd10f66b722eccc2ada9128766d002f6d751f79
---

 libavformat/hdsenc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index 012de60..d96a3d5 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;
     }



More information about the ffmpeg-cvslog mailing list