[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.c,1.7,1.8
Moritz Bunkus CVS
syncmail at mplayerhq.hu
Sun Feb 1 11:58:52 CET 2004
CVS change done by Moritz Bunkus CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv21208
Modified Files:
demux_mkv.c
Log Message:
Do not open more than one audio/video/subtitle stream at the same time.
Index: demux_mkv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- demux_mkv.c 31 Jan 2004 09:54:09 -0000 1.7
+++ demux_mkv.c 1 Feb 2004 10:58:50 -0000 1.8
@@ -1944,23 +1944,13 @@
track = demux_mkv_find_track_by_num (mkv_d, demuxer->video->id,
MATROSKA_TRACK_VIDEO);
- if (track)
- {
- for (i=0; i < mkv_d->num_tracks; i++)
- if (mkv_d->tracks[i]->type == MATROSKA_TRACK_VIDEO)
- {
- int def = (mkv_d->tracks[i] == track);
- if (demux_mkv_open_video (demuxer, mkv_d->tracks[i]) && def)
- demuxer->video->id = -2;
- else if (def)
+ if (track && !demux_mkv_open_video (demuxer, track))
{
mp_msg (MSGT_DEMUX, MSGL_INFO,
"[mkv] Will play video track %u\n", track->tnum);
demuxer->video->id = track->tnum;
demuxer->video->sh = demuxer->v_streams[track->tnum];
}
- }
- }
else
{
mp_msg (MSGT_DEMUX, MSGL_INFO, "[mkv] No video track found/wanted.\n");
@@ -2000,23 +1990,13 @@
track = demux_mkv_find_track_by_num (mkv_d, demuxer->audio->id,
MATROSKA_TRACK_AUDIO);
- if (track)
- {
- for (i=0; i < mkv_d->num_tracks; i++)
- if (mkv_d->tracks[i]->type == MATROSKA_TRACK_AUDIO)
- {
- int def = (mkv_d->tracks[i] == track);
- if (demux_mkv_open_audio (demuxer, mkv_d->tracks[i]) && def)
- demuxer->audio->id = -2;
- else if (def)
+ if (track && !demux_mkv_open_audio (demuxer, track))
{
mp_msg (MSGT_DEMUX, MSGL_INFO,
"[mkv] Will play audio track %u\n", track->tnum);
demuxer->audio->id = track->tnum;
demuxer->audio->sh = demuxer->a_streams[track->tnum];
}
- }
- }
else
{
mp_msg (MSGT_DEMUX, MSGL_INFO, "[mkv] No audio track found/wanted.\n");
@@ -2033,19 +2013,14 @@
track = demux_mkv_find_track_by_language (mkv_d, dvdsub_lang,
MATROSKA_TRACK_SUBTITLE);
- for (i=0; i < mkv_d->num_tracks; i++)
- if (mkv_d->tracks[i]->type == MATROSKA_TRACK_SUBTITLE)
- {
- int def = (mkv_d->tracks[i] == track);
- if (demux_mkv_open_sub (demuxer, mkv_d->tracks[i]) && def)
- demuxer->sub->id = -2;
- else if (def)
+ if (track && !demux_mkv_open_sub (demuxer, track))
{
mp_msg (MSGT_DEMUX, MSGL_INFO,
"[mkv] Will display subtitle track %u\n", track->tnum);
demuxer->sub->id = track->tnum;
}
- }
+ else
+ demuxer->sub->id = -2;
if (mkv_d->chapters)
{
More information about the MPlayer-cvslog
mailing list