[MPlayer-cvslog] r26123 - in trunk/libmpdemux: demux_lavf.c demux_mkv.c
eugeni
subversion at mplayerhq.hu
Fri Feb 29 18:25:52 CET 2008
Author: eugeni
Date: Fri Feb 29 18:25:52 2008
New Revision: 26123
Log:
Don't select audio stream in lavf and mkv demuxers.
Modified:
trunk/libmpdemux/demux_lavf.c
trunk/libmpdemux/demux_mkv.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c (original)
+++ trunk/libmpdemux/demux_lavf.c Fri Feb 29 18:25:52 2008
@@ -338,8 +338,8 @@ static void handle_stream(demuxer_t *dem
if (st->language)
sh_audio->lang = strdup(st->language);
if(mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf, MSGL_V);
- if((audio_lang && st->language[0] && !strncmp(audio_lang, st->language, 3))
- || (demuxer->audio->id == i || demuxer->audio->id == -1)) {
+ // select the first audio stream
+ if (!demuxer->audio->sh) {
demuxer->audio->id = i;
demuxer->audio->sh= demuxer->a_streams[i];
} else
Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c (original)
+++ trunk/libmpdemux/demux_mkv.c Fri Feb 29 18:25:52 2008
@@ -2418,14 +2418,7 @@ demux_mkv_open (demuxer_t *demuxer)
/* select audio track */
track = NULL;
- if (demuxer->audio->id == -1) /* automatically select an audio track */
- {
- /* check if the user specified an audio language */
- if (audio_lang != NULL)
- track = demux_mkv_find_track_by_language(mkv_d, audio_lang,
- MATROSKA_TRACK_AUDIO);
if (track == NULL)
- /* no audio language specified, or language not found */
/* search for an audio track that has the 'default' flag set */
for (i=0; i < mkv_d->num_tracks; i++)
if (mkv_d->tracks[i]->type == MATROSKA_TRACK_AUDIO
@@ -2444,10 +2437,7 @@ demux_mkv_open (demuxer_t *demuxer)
track = mkv_d->tracks[i];
break;
}
- }
- else if (demuxer->audio->id != -2) /* -2 = no audio at all */
- track = demux_mkv_find_track_by_num (mkv_d, demuxer->audio->id,
- MATROSKA_TRACK_AUDIO);
+
if (track && demuxer->a_streams[track->tnum])
{
demuxer->audio->id = track->tnum;
More information about the MPlayer-cvslog
mailing list