From 2205e86985e4571d53f60389ffe144fc54af4347 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Fri, 4 Aug 2006 20:18:21 +0000 Subject: [PATCH] auto-detection of mpeg-ps in mov; initial patch by John Koleszar jkoleszar on2 com (fixed by me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19331 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_mov.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c index 1e0379a5c5..e2da4327b4 100644 --- a/libmpdemux/demux_mov.c +++ b/libmpdemux/demux_mov.c @@ -1890,6 +1890,24 @@ static demuxer_t* mov_read_header(demuxer_t* demuxer){ } } + if(demuxer->video->id<0 && demuxer->audio->id<0) { + /* No AV streams found. Try to find an MPEG stream. */ + for(t_no=0;t_notrack_db;t_no++){ + mov_track_t* trak=priv->tracks[t_no]; + if(trak->media_handler == MOV_FOURCC('M','P','E','G')) { + stream_t *s; + demuxer_t *od; + + demuxer->video->id = t_no; + s = new_ds_stream(demuxer->video); + od = demux_open(s, DEMUXER_TYPE_MPEG_PS, -1, -1, -1, NULL); + if(od) return new_demuxers_demuxer(od, od, od); + demuxer->video->id = -2; //new linked demuxer couldn't be allocated + break; + } + } + } + #if 0 if( mp_msg_test(MSGT_DEMUX,MSGL_DBG3) ){ for(t_no=0;t_notrack_db;t_no++){