[MPlayer-dev-eng] [PATCH] Exit if preinit of af chain fails

Michael Niedermayer michaelni at gmx.at
Tue Aug 23 01:42:34 CEST 2005


Hi

On Mon, Aug 22, 2005 at 06:55:44PM +0200, Ivo wrote:
> On Monday 22 August 2005 18:20, Michael Niedermayer wrote:
> > On Mon, Aug 22, 2005 at 05:56:24PM +0300, Ivan Kalvachev wrote:
> > > If you ask me, I think it is wrong to kill mplayer because some filter
> > > cannot init. It would be better if this filter is just not used.
> >
> > disagree, mplayer should fail if a filter fails
> > its very lame to spend a few hours encoding and then notice that audio
> > hasnt been resampled or its volume corrected ...
> 
> Agree. I looked into it and MEncoder actually does this already:
> 
> if(!preinit_audio_filters(sh_audio,
>    // input:
>    new_srate,
>    sh_audio->channels, sh_audio->sample_format,
>    // output:
>    &ao_data.samplerate, &ao_data.channels, &ao_data.format)) {
>      mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError);
>      mencoder_exit(1, NULL);
>    }
> 
> So, my patch actually mimics MEncoder's behaviour without knowing that 
> beforehand :)
> 
> Although playing is different than encoding, I think it's needed for MPlayer 
> too. Imagine using -ao pcm for example, or you start playing a DVD with a 
> ladspa limitter on the sound to not disturb the neighbours late at night, 
> only to find out you mistyped a : after ten minutes when the first loud 
> explossion in the film occurs (which was not limitted) and you have to walk 
> back to your computer to fix it, which is very annoying (not to mention 
> that you have woken up your neighbour and you'll never be able to borrow a 
> cup of sugar again :) ).

the question is not if you ll be able to borrow a cup of sugar from them but
what the white powder in the cup will be

[...]

-- 
Michael




More information about the MPlayer-dev-eng mailing list