aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-03-26 16:54:53 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-03-26 16:54:53 +0000
commite31bd3e309d766dc240c4f91331599ffcde1c867 (patch)
treebd3f173bd8758c37b875773e1fce958772cf6a42 /libavformat/mov.c
parent94ede53e57e5864a1f94cb5cae25cd0b142212ae (diff)
downloadffmpeg-e31bd3e309d766dc240c4f91331599ffcde1c867.tar.gz
add mp3on4 detection, fix red.mp4
Originally committed as revision 5222 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5eb258e36d..0e6e8dfe18 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -600,6 +600,10 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
if (st->codec->extradata) {
get_buffer(pb, st->codec->extradata, len);
st->codec->extradata_size = len;
+ /* from mplayer */
+ if ((*(uint8_t *)st->codec->extradata >> 3) == 29) {
+ st->codec->codec_id = CODEC_ID_MP3ON4;
+ }
}
}
}
@@ -1134,11 +1138,17 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
if(st->codec->codec_type==CODEC_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1) {
st->codec->sample_rate= sc->time_scale;
}
+
+ switch (st->codec->codec_id) {
#ifdef CONFIG_FAAD
- if(st->codec->codec_id ==CODEC_ID_AAC) {
- st->codec->sample_rate= 0; /* let faad init parameters properly */
- }
+ case CODEC_ID_AAC:
#endif
+ case CODEC_ID_MP3ON4:
+ st->codec->sample_rate= 0; /* let decoder init parameters properly */
+ break;
+ default:
+ break;
+ }
return 0;
}