summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_mov.c
diff options
context:
space:
mode:
authormosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-15 15:04:57 +0000
committermosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-11-15 15:04:57 +0000
commit6fcdde79efdf0024922f89b95ce06ded4815cc38 (patch)
tree99bb948f387998ee5c81e920d87becbd69916a9d /libmpdemux/demux_mov.c
parentb3dcfc7ec68bfd1e6e5333fe784e3c8676a0734e (diff)
downloadmpv-6fcdde79efdf0024922f89b95ce06ded4815cc38.tar.bz2
mpv-6fcdde79efdf0024922f89b95ce06ded4815cc38.tar.xz
Extended support for other object type IDs in the ESDS. This enables e.g. MPEG2 video in the MP4 container.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13955 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_mov.c')
-rw-r--r--libmpdemux/demux_mov.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index d685f8388f..68b5d7132d 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -946,7 +946,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
sh->i_bps = esds.avgBitrate/8;
// printf("######## audio format = %d ########\n",esds.objectTypeId);
- if(esds.objectTypeId==107)
+ if(esds.objectTypeId==MP4OTI_MPEG1Audio || esds.objectTypeId==MP4OTI_MPEG2AudioPart3)
sh->format=0x55; // .mp3
// dump away the codec specific configuration for the AAC decoder
@@ -1103,6 +1103,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
esds_t esds;
if(!mp4_parse_esds(trak->stdata+pos+8, atom_len-8, &esds)) {
+ if(esds.objectTypeId==MP4OTI_MPEG2VisualSimple || esds.objectTypeId==MP4OTI_MPEG2VisualMain ||
+ esds.objectTypeId==MP4OTI_MPEG2VisualSNR || esds.objectTypeId==MP4OTI_MPEG2VisualSpatial ||
+ esds.objectTypeId==MP4OTI_MPEG2VisualHigh || esds.objectTypeId==MP4OTI_MPEG2Visual422)
+ sh->format=mmioFOURCC('m', 'p', 'g', '2');
+ else if(esds.objectTypeId==MP4OTI_MPEG1Visual)
+ sh->format=mmioFOURCC('m', 'p', 'g', '1');
+
// dump away the codec specific configuration for the AAC decoder
trak->stream_header_len = esds.decoderConfigLen;
trak->stream_header = (unsigned char *)malloc(trak->stream_header_len);