[FFmpeg-cvslog] flvdec: use the correct audio codec id when parsing metadata

Justin Ruggles git at videolan.org
Sun May 12 12:46:37 CEST 2013


ffmpeg | branch: release/1.1 | Justin Ruggles <justin.ruggles at gmail.com> | Thu Mar 21 08:03:58 2013 -0400| [aba56c03b9558b80bd601bc58088a43c9b791ed1] | committer: Reinhard Tartler

flvdec: use the correct audio codec id when parsing metadata

(cherry picked from commit c3d015775388882b8a122afc337ea35108f652be)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

 libavformat/flvdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 403a9b5..2821dd8 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;



More information about the ffmpeg-cvslog mailing list