Module: libav Branch: release/11 Commit: 0f9c6a938b984fd5fc4540115634e71b2bdded8c
Author: Luca Barbato <[email protected]> Committer: Luca Barbato <[email protected]> Date: Thu Sep 3 17:31:14 2015 +0200 nut: Use the correct codec_tag when multiple are available Some codecs use the codec_tag to signal specific information and picking the first one would lead to a broken file. Bug-Id: 883 CC: [email protected] Signed-off-by: Luca Barbato <[email protected]> --- libavformat/nutenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index b68e00e..a6f14d7 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -436,7 +436,8 @@ static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, } ff_put_v(bc, 4); - if (!codec_tag || codec->codec_id == AV_CODEC_ID_RAWVIDEO) + if (av_codec_get_id(ff_nut_codec_tags, codec->codec_tag) == codec->codec_id || + !codec_tag || codec->codec_id == AV_CODEC_ID_RAWVIDEO) codec_tag = codec->codec_tag; if (codec_tag) { _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
