[FFmpeg-devel] [PATCH] examples/filtering_audio: get rid of AVABufferSinkParams
Pavel Koshevoy
pkoshevoy at gmail.com
Thu Apr 18 18:48:09 CEST 2013
On 04/18/2013 10:34 AM, Pavel Koshevoy wrote:
> On 04/17/2013 07:46 AM, Pavel Koshevoy wrote:
>> On 4/17/13 3:18 AM, Michael Niedermayer wrote:
>>> On Wed, Apr 17, 2013 at 12:46:49AM -0600, pkoshevoy at gmail.com wrote:
>>>> From: Pavel Koshevoy <pkoshevoy at gmail.com>
>>
>> <snip>
>>
>>>> Also, make the example a bit more interesting.
>>> i didnt apply that part because it seems theres some bug somewhere,
>>> possibly in the atempo filter:
>>>
>>> ==27906== Invalid read of size 2
>>> ==27906== at 0x460463: print_frame (filtering_audio.c:192)
>>> ==27906== by 0x460706: main (filtering_audio.c:253)
>>> ==27906== Address 0xc5e9d40 is 0 bytes after a block of size 1,280 alloc'd
>>> ==27906== at 0x4C2A6C5: memalign (vg_replace_malloc.c:727)
>>> ==27906== by 0x4C2A760: posix_memalign (vg_replace_malloc.c:876)
>>> ==27906== by 0xB73D6F: av_malloc (mem.c:93)
>>> ==27906== by 0xB68737: av_buffer_alloc (buffer.c:70)
>>> ==27906== by 0x461A28: ff_default_get_audio_buffer (audio.c:57)
>>> ==27906== by 0x4A84AC: filter_frame (af_atempo.c:1073)
>>>
>>
>> Thanks, I'll take a look at that after work.
>>
>> Pavel.
>
> Hi,
>
> I've submitted a fix for this last night --
> https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2013-April/142577.html
>
> Pavel.
>
I've noticed valgrind is reporting a similar problem with aresample filter.
However, I didn't investigate.
$ valgrind --partial-loads-ok=yes --undef-value-errors=yes --track-origins=yes
./filtering_audio 02\ Feeling\ Good.mp3 | ffplay -f s16le -ar 8000 -ac 1 -
==21957== Memcheck, a memory error detector
==21957== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==21957== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==21957== Command: ./filtering_audio /scratch/DataSets/Video/au/02\ Feeling\
Good.mp3
==21957==
ffplay version N-52236-g9286d0f Copyright (c) 2003-2013 the FFmpeg developers
built on Apr 17 2013 23:36:06 with gcc 4.7 (SUSE Linux)
configuration: --prefix=/Developer/x86_64 --enable-gpl
--enable-runtime-cpudetect --disable-optimizations --disable-stripping
--enable-debug=3 --enable-libxvid --enable-libx264 --enable-libvpx
--enable-libvorbis --enable-libtheora --enable-bzlib --enable-gnutls
--enable-libass --enable-libcelt --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libfreetype --enable-libgsm
--enable-libmodplug --enable-libmp3lame --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libdc1394 --enable-version3
libavutil 52. 26.100 / 52. 26.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 2.100 / 55. 2.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 56.103 / 3. 56.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
max_analyze_duration 5000000 reached at 5015510 microseconds 0KB sq= 0B f=0/0
[mp3 @ 0xc15c3a0] Estimating duration from bitrate, this may be inaccurate
Output: srate:8000Hz fmt:s16 chlayout:mono 0KB sq= 0B f=0/0
==21957== Invalid read of size 8 0KB vq= 0KB sq= 0B f=0/0
==21957== at 0xC86205: swri_resample_int16_ssse3 (resample_template.c:122)
==21957== by 0xC86693: multiple_resample (resample.c:321)
==21957== by 0xC7C9CD: resample (swresample.c:568)
==21957== by 0xC7D155: swr_convert_internal (swresample.c:672)
==21957== by 0xC7DA72: swr_convert (swresample.c:776)
==21957== by 0x46BC76: filter_frame (af_aresample.c:197)
==21957== by 0x411931: ff_filter_frame_framed (avfilter.c:917)
==21957== by 0x411C32: ff_filter_frame (avfilter.c:990)
==21957== by 0x417B23: request_frame (buffersrc.c:489)
==21957== by 0x40FEFB: ff_request_frame (avfilter.c:330)
==21957== by 0x46BD33: request_frame (af_aresample.c:222)
==21957== by 0x40FEFB: ff_request_frame (avfilter.c:330)
==21957== Address 0xc2a9fba is 2,298 bytes inside a block of size 2,304 alloc'd
==21957== at 0x4C290FE: memalign (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21957== by 0x4C291A7: posix_memalign (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21957== by 0xD6CECD: av_malloc (mem.c:93)
==21957== by 0xD60228: av_buffer_alloc (buffer.c:70)
==21957== by 0xD6091D: pool_alloc_buffer (buffer.c:305)
==21957== by 0xD60A91: av_buffer_pool_get (buffer.c:343)
==21957== by 0xA42C56: audio_get_buffer (utils.c:490)
==21957== by 0xA43334: avcodec_default_get_buffer2 (utils.c:601)
==21957== by 0xA43C4C: get_buffer_internal (utils.c:812)
==21957== by 0xA43C7C: ff_get_buffer (utils.c:817)
==21957== by 0x9006C4: mp_decode_frame (mpegaudiodec.c:1631)
==21957== by 0x900A8A: decode_frame (mpegaudiodec.c:1707)
==21957==
[s16le @ 0x2a450e0] max_analyze_duration 5000000 reached at 5119274 microseconds
Input #0, s16le, from 'pipe:':
Duration: N/A, bitrate: 128 kb/s
Stream #0:0: Audio: pcm_s16le, 8000 Hz, 1 channels, s16, 128 kb/s
More information about the ffmpeg-devel
mailing list