[MPlayer-cvslog] r24914 - trunk/libmpcodecs/dec_audio.c
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 1 11:12:01 CET 2007
Hello,
On Thu, Nov 01, 2007 at 07:51:53AM +0100, uau wrote:
> Author: uau
> Date: Thu Nov 1 07:51:53 2007
> New Revision: 24914
>
> Log:
> Replace hopefully unreachable code with abort()
>
>
> Modified:
> trunk/libmpcodecs/dec_audio.c
>
> Modified: trunk/libmpcodecs/dec_audio.c
> ==============================================================================
> --- trunk/libmpcodecs/dec_audio.c (original)
> +++ trunk/libmpcodecs/dec_audio.c Thu Nov 1 07:51:53 2007
> @@ -388,13 +388,8 @@ int decode_audio(sh_audio_t *sh_audio, u
> af_data_t *pafd; // filter output
> ad_functions_t *mpadec = sh_audio->ad_driver;
>
> - if (!sh_audio->inited)
> - return -1; // no codec
> - if (!sh_audio->afilter) {
> - // no filter, just decode:
> - // FIXME: don't drop initial decoded data in a_buffer!
> - return mpadec->decode_audio(sh_audio, buf, minlen, maxlen);
> - }
> + if (!sh_audio->inited || !sh_audio->afilter)
> + abort();
Can't we just get rid of it? It should just crash with NULL pointer
dereference later anyway if this is not true, I don't consider abort()
any better...
Greetings,
Reimar Döffinger
More information about the MPlayer-cvslog
mailing list