[MPlayer-cvslog] r25281 - trunk/libmpcodecs/dec_audio.c
Ulion
ulion2002 at gmail.com
Mon Dec 3 10:14:00 CET 2007
2007/12/3, rfelker <subversion at mplayerhq.hu>:
> Author: rfelker
> Date: Mon Dec 3 10:07:31 2007
> New Revision: 25281
>
> Log:
> fix declaration after statement, take 2
>
This change break the original code. the '.len' may change after that
decode loop.
> Modified:
> trunk/libmpcodecs/dec_audio.c
>
> Modified: trunk/libmpcodecs/dec_audio.c
> ==============================================================================
> --- trunk/libmpcodecs/dec_audio.c (original)
> +++ trunk/libmpcodecs/dec_audio.c Mon Dec 3 10:07:31 2007
> @@ -362,6 +362,15 @@ int init_audio_filters(sh_audio_t *sh_au
> static int filter_n_bytes(sh_audio_t *sh, int len)
> {
> int error = 0;
> + // Filter
> + af_data_t filter_input = {
> + .audio = sh->a_buffer,
> + .len = len,
> + .rate = sh->samplerate,
> + .nch = sh->channels,
> + .format = sh->sample_format
> + };
> + af_data_t *filter_output;
>
> assert(len-1 + sh->audio_out_minsize <= sh->a_buffer_size);
>
> @@ -379,16 +388,8 @@ static int filter_n_bytes(sh_audio_t *sh
> sh->a_buffer_len += ret;
> }
>
> - // Filter
> - af_data_t filter_input = {
> - .audio = sh->a_buffer,
> - .len = len,
> - .rate = sh->samplerate,
> - .nch = sh->channels,
> - .format = sh->sample_format
> - };
> af_fix_parameters(&filter_input);
> - af_data_t *filter_output = af_play(sh->afilter, &filter_input);
> + filter_output = af_play(sh->afilter, &filter_input);
> if (!filter_output)
> return -1;
> if (sh->a_out_buffer_size < sh->a_out_buffer_len + filter_output->len) {
> _______________________________________________
> MPlayer-cvslog mailing list
> MPlayer-cvslog at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-cvslog
>
--
Ulion
More information about the MPlayer-cvslog
mailing list