From c3d015775388882b8a122afc337ea35108f652be Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Thu, 21 Mar 2013 08:03:58 -0400 Subject: [PATCH] flvdec: use the correct audio codec id when parsing metadata --- libavformat/flvdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 403a9b5089..2821dd8c34 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -417,7 +417,8 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst flv_set_video_codec(s, vstream, num_val, 0); } else if (!strcmp(key, "audiocodecid") && acodec) { - flv_set_audio_codec(s, astream, acodec, num_val); + int id = ((int)num_val) << FLV_AUDIO_CODECID_OFFSET; + flv_set_audio_codec(s, astream, acodec, id); } else if (!strcmp(key, "audiosamplerate") && acodec) { acodec->sample_rate = num_val;