Mercurial > mplayer.hg
changeset 19325:0a78cbf7c24f
auto-detection of mpeg-ps in mov; initial patch by John Koleszar jkoleszar on2 com (fixed by me)
author | nicodvb |
---|---|
date | Fri, 04 Aug 2006 20:18:21 +0000 |
parents | 517a185ba22a |
children | f399b52a985a |
files | libmpdemux/demux_mov.c |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c Fri Aug 04 20:13:43 2006 +0000 +++ b/libmpdemux/demux_mov.c Fri Aug 04 20:18:21 2006 +0000 @@ -1890,6 +1890,24 @@ } } + if(demuxer->video->id<0 && demuxer->audio->id<0) { + /* No AV streams found. Try to find an MPEG stream. */ + for(t_no=0;t_no<priv->track_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_no<priv->track_db;t_no++){