[MPlayer-dev-eng] [PATCH] support for -alang in demux_lavf

Nico Sabbi nicola_sabbi at fastwebnet.it
Wed Jun 21 01:23:24 CEST 2006


Nico Sabbi wrote:

> $Subject
>
> Michael, ok to proceed?
>
>    Nico
>
>------------------------------------------------------------------------
>
>Index: libmpdemux/demux_lavf.c
>===================================================================
>--- libmpdemux/demux_lavf.c	(revisione 18765)
>+++ libmpdemux/demux_lavf.c	(copia locale)
>@@ -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)
>+	    if((audio_lang && st->language[0] && !strncmp(audio_lang, st->language, 3))
>+	        || (demuxer->audio->id == i || demuxer->audio->id == -i)
>  
>
 ^^^^^^^^^^^^^^^^^^^^ of course this check should read

demuxer->audio->id == -1




More information about the MPlayer-dev-eng mailing list