mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
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
This commit is contained in:
parent
754f80ae18
commit
2205e86985
@ -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_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++){
|
||||
|
Loading…
Reference in New Issue
Block a user