[FFmpeg-devel] ADTS parser in aac.c does not set samplerate

Alex Converse alex.converse
Tue Dec 8 00:18:52 CET 2009


On Mon, Dec 7, 2009 at 5:41 PM, Andreas ?man <andreas at lonelycoder.com> wrote:
> Hi,
>
> When decoding ADTS framed data directly with the AAC decoder
> avctx->sample_rate is not set. The attached patch fixes
> that.
>

Doesn't the parser set that?

aac_ac3_parser.c:73-74
    /* update codec info */
    avctx->sample_rate = s->sample_rate;

$ ./ffmpeg_g -i
~/Projects/14496-4/mpeg2aac-conformance/compressedAdts/al09_44.adts -f
null /dev/null
FFmpeg version SVN-r20710, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Dec  6 2009 21:07:23 with gcc 4.4.1
  configuration: --enable-gpl --disable-ffserver
  libavutil     50. 5. 1 / 50. 5. 1
  libavcodec    52.42. 0 / 52.42. 0
  libavformat   52.39. 2 / 52.39. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 2 /  0. 7. 2
[aac @ 0x18323c0]max_analyze_duration reached
[aac @ 0x18323c0]Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from
'/home/alex/Projects/14496-4/mpeg2aac-conformance/compressedAdts/al09_44.adts':
  Duration: 00:00:10.04, bitrate: 50 kb/s
    Stream #0.0: Audio: aac, 44100 Hz, 1 channels, s16, 50 kb/s
Output #0, null, to '/dev/null':
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=      -0kB time=7.94 bitrate=  -0.0kbits/s
video:0kB audio:684kB global headers:0kB muxing overhead -100.003141%


> I'm not sure how it will work in conjunction with SBR.
>
> Alex?
>

Don't worry about implicit SBR for now. I still haven't come up with a
good solution to properly set the output sample rate in time.



More information about the ffmpeg-devel mailing list