[FFmpeg-cvslog] r20773 - trunk/libavcodec/aac.c

andoma subversion
Tue Dec 8 20:20:36 CET 2009


Author: andoma
Date: Tue Dec  8 20:20:36 2009
New Revision: 20773

Log:
aac: Set sample rate in avctx from ADTS header (if not already set by some
other means)

Modified:
   trunk/libavcodec/aac.c

Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c	Tue Dec  8 18:38:02 2009	(r20772)
+++ trunk/libavcodec/aac.c	Tue Dec  8 20:20:36 2009	(r20773)
@@ -1692,6 +1692,8 @@ static int parse_adts_frame_header(AACCo
         ac->m4ac.sample_rate     = hdr_info.sample_rate;
         ac->m4ac.sampling_index  = hdr_info.sampling_index;
         ac->m4ac.object_type     = hdr_info.object_type;
+        if (!ac->avccontext->sample_rate)
+            ac->avccontext->sample_rate = hdr_info.sample_rate;
         if (hdr_info.num_aac_frames == 1) {
             if (!hdr_info.crc_absent)
                 skip_bits(gb, 16);



More information about the ffmpeg-cvslog mailing list