[FFmpeg-cvslog] r23947 - in trunk/libavformat: flvdec.c mov.c

bcoudurier subversion
Fri Jul 2 00:31:31 CEST 2010


Author: bcoudurier
Date: Fri Jul  2 00:31:31 2010
New Revision: 23947

Log:
Use ext sample from mpeg4audio config if set with AAC SBR

Modified:
   trunk/libavformat/flvdec.c
   trunk/libavformat/mov.c

Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c	Fri Jul  2 00:09:22 2010	(r23946)
+++ trunk/libavformat/flvdec.c	Fri Jul  2 00:31:31 2010	(r23947)
@@ -414,7 +414,10 @@ static int flv_read_packet(AVFormatConte
                 ff_mpeg4audio_get_config(&cfg, st->codec->extradata,
                                          st->codec->extradata_size);
                 st->codec->channels = cfg.channels;
-                st->codec->sample_rate = cfg.sample_rate;
+                if (cfg.ext_sample_rate)
+                    st->codec->sample_rate = cfg.ext_sample_rate;
+                else
+                    st->codec->sample_rate = cfg.sample_rate;
                 dprintf(s, "mp4a config channels %d sample rate %d\n",
                         st->codec->channels, st->codec->sample_rate);
             }

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Fri Jul  2 00:09:22 2010	(r23946)
+++ trunk/libavformat/mov.c	Fri Jul  2 00:31:31 2010	(r23947)
@@ -535,8 +535,10 @@ int ff_mov_read_esds(AVFormatContext *fc
                 st->codec->channels = cfg.channels;
                 if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4
                     st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index];
+                else if (cfg.ext_sample_rate)
+                    st->codec->sample_rate = cfg.ext_sample_rate;
                 else
-                    st->codec->sample_rate = cfg.sample_rate; // ext sample rate ?
+                    st->codec->sample_rate = cfg.sample_rate;
                 dprintf(fc, "mp4a config channels %d obj %d ext obj %d "
                         "sample rate %d ext sample rate %d\n", st->codec->channels,
                         cfg.object_type, cfg.ext_object_type,



More information about the ffmpeg-cvslog mailing list