[FFmpeg-devel] [PATCH] libavfilter/af_atempo: Fix uninitialized memory access
Pavel Koshevoy
pkoshevoy at gmail.com
Sun Apr 21 02:57:08 CEST 2013
On 4/18/13 2:42 PM, Paul B Mahol wrote:
> On 4/18/13, Michael Niedermayer <michaelni at gmx.at> wrote:
>> 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 ?
> Its unrelated to original problem, so should be disscussed separately.
>
I observed that this change caused intermittent non-fatal error messages:
Error while decoding stream #0:0: Resource temporarily unavailable
The command line I used was /Developer/x86_64/bin/ffmpeg -f lavfi -i
'aevalsrc=s=8000:c=mono:exprs=sin(0.5*2*PI*t)*sin(440*2*PI*t):d=24000'
-af atempo=23976/25000 -y
/nfs/scratch/DataSets/Video/au/06h-40m-23976to25000.au
So, I am OK with dropping this change. Do I need to submit another patch?
I am working on a fix for ticket #2484, and I don't think it makes sense
to submit a patch for 2484 if this patch hasn't been applied yet.
Thank you,
Pavel.
More information about the ffmpeg-devel
mailing list