Set audio bit rate.
authorHoward Chu <hyc@highlandsun.com>
Sun, 11 Apr 2010 12:21:30 +0000 (12:21 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Sun, 11 Apr 2010 12:21:30 +0000 (12:21 +0000)
Patch by Howard Chu, hyc highlandsun com

Originally committed as revision 22835 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/flvdec.c

index 437ec9b..24a414e 100644 (file)
@@ -195,6 +195,8 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
             if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE;
             else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0))
                 vcodec->bit_rate = num_val * 1024.0;
+            else if(!strcmp(key, "audiodatarate") && acodec && 0 <= (int)(num_val * 1024.0))
+                acodec->bit_rate = num_val * 1024.0;
         } else if (amf_type == AMF_DATA_TYPE_STRING)
           av_metadata_set(&s->metadata, key, str_val);
     }