[FFmpeg-devel] [PATCH] libavfilter/af_atempo: Fix uninitialized memory access

Michael Niedermayer michaelni at gmx.at
Thu Apr 18 21:21:32 CEST 2013


On Wed, Apr 17, 2013 at 10:33:34PM -0600, pkoshevoy at gmail.com wrote:
> From: Pavel Koshevoy <pkoshevoy at gmail.com>
> 
> valgrind reported uninitialized memory access which was caused by
> incorrect number of samples being passed to push_samples(..)
> 
> Signed-off-by: Pavel Koshevoy <pkoshevoy at gmail.com>
> ---
>  libavfilter/af_atempo.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
> index 3e2bc06..f5c5da8 100644
> --- a/libavfilter/af_atempo.c
> +++ b/libavfilter/af_atempo.c
> @@ -1061,7 +1061,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
>      ATempoContext *atempo = ctx->priv;
>      AVFilterLink *outlink = ctx->outputs[0];
>  
> -    int ret = 0;
> +    int ret = AVERROR(EAGAIN);
>      int n_in = src_buffer->nb_samples;
>      int n_out = (int)(0.5 + ((double)n_in) / atempo->tempo);
>  

this looks odd, what is the intent of this change ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130418/66893dc6/attachment.asc>


More information about the ffmpeg-devel mailing list