diff options
author | Patrick Dehne <patrick@mysonicweb.com> | 2009-06-19 14:36:47 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2009-06-19 14:36:47 +0000 |
commit | d52b90bdb454e3dcda7652e50ac6a96a7a1f5b22 (patch) | |
tree | 9d032beaf87ff5e279e4bb393db8dadc85378399 | |
parent | 50fcd5be36d04a7674f5eef267ef71117efa3796 (diff) | |
download | ffmpeg-d52b90bdb454e3dcda7652e50ac6a96a7a1f5b22.tar.gz |
Add support for id3 tag parsing for ADTS AAC streams
Patch by Patrick Dehne ( patrick mysonicweb com )
Originally committed as revision 19225 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/raw.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index f086581b2a..1311187c0e 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -27,6 +27,7 @@ #include "avformat.h" #include "raw.h" #include "id3v2.h" +#include "id3v1.h" /* simple formats */ @@ -625,6 +626,26 @@ static int adts_aac_probe(AVProbeData *p) else if(max_frames>=1) return 1; else return 0; } + +static int adts_aac_read_header(AVFormatContext *s, + AVFormatParameters *ap) +{ + AVStream *st; + + st = av_new_stream(s, 0); + if (!st) + return AVERROR(ENOMEM); + + st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_id = s->iformat->value; + st->need_parsing = AVSTREAM_PARSE_FULL; + + ff_id3v1_read(s); + ff_id3v2_read(s); + + return 0; +} + #endif /* Note: Do not forget to add new entries to the Makefile as well. */ @@ -635,7 +656,7 @@ AVInputFormat aac_demuxer = { NULL_IF_CONFIG_SMALL("raw ADTS AAC"), 0, adts_aac_probe, - audio_read_header, + adts_aac_read_header, ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "aac", |