[MPlayer-cvslog] r18778 - trunk/libmpdemux/demux_lavf.c
nicodvb
subversion at mplayerhq.hu
Wed Jun 21 21:24:17 CEST 2006
Author: nicodvb
Date: Wed Jun 21 21:24:17 2006
New Revision: 18778
Modified:
trunk/libmpdemux/demux_lavf.c
Log:
support for -alang
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c (original)
+++ trunk/libmpdemux/demux_lavf.c Wed Jun 21 21:24:17 2006
@@ -37,6 +37,8 @@
#define PROBE_BUF_SIZE 2048
+extern char *audio_lang;
+
typedef struct lavf_priv_t{
AVInputFormat *avif;
AVFormatContext *avfc;
@@ -244,12 +246,14 @@
break;
}
if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf, MSGL_V);
- if(demuxer->audio->id != i && demuxer->audio->id != -1)
- st->discard= AVDISCARD_ALL;
- else{
- demuxer->audio->id = i;
+ if((audio_lang && st->language[0] && !strncmp(audio_lang, st->language, 3))
+ || (demuxer->audio->id == i || demuxer->audio->id == -1)
+ ) {
+ demuxer->audio->id = i;
demuxer->audio->sh= demuxer->a_streams[i];
- }
+ }
+ else
+ st->discard= AVDISCARD_ALL;
break;}
case CODEC_TYPE_VIDEO:{
BITMAPINFOHEADER *bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1);
More information about the MPlayer-cvslog
mailing list