Mercurial > mplayer.hg
changeset 26091:8732f2107b56
Don't select audio stream in lavf and mkv demuxers.
author | eugeni |
---|---|
date | Fri, 29 Feb 2008 17:25:52 +0000 |
parents | c585e2ad8ebf |
children | 97d145792c1b |
files | libmpdemux/demux_lavf.c libmpdemux/demux_mkv.c |
diffstat | 2 files changed, 3 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Fri Feb 29 17:25:50 2008 +0000 +++ b/libmpdemux/demux_lavf.c Fri Feb 29 17:25:52 2008 +0000 @@ -338,8 +338,8 @@ 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
--- a/libmpdemux/demux_mkv.c Fri Feb 29 17:25:50 2008 +0000 +++ b/libmpdemux/demux_mkv.c Fri Feb 29 17:25:52 2008 +0000 @@ -2418,14 +2418,7 @@ /* 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 @@ 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;