comparison libmpdemux/demux_mov.c @ 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 7e689bb31c07
children f399b52a985a
comparison
equal deleted inserted replaced
19324:517a185ba22a 19325:0a78cbf7c24f
1888 mp_msg(MSGT_DEMUX, MSGL_ERR, "MOV: selected video stream (%d) does not exists\n",demuxer->video->id); 1888 mp_msg(MSGT_DEMUX, MSGL_ERR, "MOV: selected video stream (%d) does not exists\n",demuxer->video->id);
1889 demuxer->video->id=-2; 1889 demuxer->video->id=-2;
1890 } 1890 }
1891 } 1891 }
1892 1892
1893 if(demuxer->video->id<0 && demuxer->audio->id<0) {
1894 /* No AV streams found. Try to find an MPEG stream. */
1895 for(t_no=0;t_no<priv->track_db;t_no++){
1896 mov_track_t* trak=priv->tracks[t_no];
1897 if(trak->media_handler == MOV_FOURCC('M','P','E','G')) {
1898 stream_t *s;
1899 demuxer_t *od;
1900
1901 demuxer->video->id = t_no;
1902 s = new_ds_stream(demuxer->video);
1903 od = demux_open(s, DEMUXER_TYPE_MPEG_PS, -1, -1, -1, NULL);
1904 if(od) return new_demuxers_demuxer(od, od, od);
1905 demuxer->video->id = -2; //new linked demuxer couldn't be allocated
1906 break;
1907 }
1908 }
1909 }
1910
1893 #if 0 1911 #if 0
1894 if( mp_msg_test(MSGT_DEMUX,MSGL_DBG3) ){ 1912 if( mp_msg_test(MSGT_DEMUX,MSGL_DBG3) ){
1895 for(t_no=0;t_no<priv->track_db;t_no++){ 1913 for(t_no=0;t_no<priv->track_db;t_no++){
1896 mov_track_t* trak=priv->tracks[t_no]; 1914 mov_track_t* trak=priv->tracks[t_no];
1897 if(trak->type==MOV_TRAK_GENERIC){ 1915 if(trak->type==MOV_TRAK_GENERIC){