[FFmpeg-trac] #3355(documentation:open): mp2 decoding of decoding_encoding.c API example is broken
FFmpeg
trac at avcodec.org
Tue Jan 28 12:03:41 CET 2014
#3355: mp2 decoding of decoding_encoding.c API example is broken
-------------------------------------+-------------------------------------
Reporter: sdem | Owner:
Type: defect | Status: open
Priority: minor | Component:
Version: git-master | documentation
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 1
-------------------------------------+-------------------------------------
Changes (by ubitux):
* status: new => open
* reproduced: 0 => 1
Comment:
{{{
☭ valgrind doc/examples/decoding_encoding_g mp2
==26166== Memcheck, a memory error detector
==26166== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==26166== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright
info
==26166== Command: doc/examples/decoding_encoding_g mp2
==26166==
Encode audio file test.mp2
Decode audio file test.mp2 to test.sw
==26166== Syscall param write(buf) points to unaddressable byte(s)
==26166== at 0x69109B0: __write_nocancel (in /usr/lib/libc-2.18.so)
==26166== by 0x68ABFE2: _IO_file_write@@GLIBC_2.2.5 (in
/usr/lib/libc-2.18.so)
==26166== by 0x68AB6A2: new_do_write (in /usr/lib/libc-2.18.so)
==26166== by 0x68AC5F5: _IO_file_xsputn@@GLIBC_2.2.5 (in
/usr/lib/libc-2.18.so)
==26166== by 0x68A273C: fwrite (in /usr/lib/libc-2.18.so)
==26166== by 0x4481D0: audio_decode_example.constprop.6
(decoding_encoding.c:310)
==26166== by 0x4477E1: main (decoding_encoding.c:642)
==26166== Address 0x7023680 is 0 bytes after a block of size 2,304
alloc'd
==26166== at 0x4C29D00: memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==26166== by 0x4C29E17: posix_memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==26166== by 0x9AE6E9: av_malloc (mem.c:94)
==26166== by 0x9A2A57: av_buffer_alloc (buffer.c:70)
==26166== by 0x9A337B: av_buffer_pool_get (buffer.c:305)
==26166== by 0x7A59A6: avcodec_default_get_buffer2 (utils.c:631)
==26166== by 0x7A632E: ff_get_buffer (utils.c:973)
==26166== by 0x6ABB1E: mp_decode_frame (mpegaudiodec_template.c:1608)
==26166== by 0x6ABFED: decode_frame (mpegaudiodec_template.c:1684)
==26166== by 0x7A7DD5: avcodec_decode_audio4 (utils.c:2277)
==26166== by 0x4480C7: audio_decode_example.constprop.6
(decoding_encoding.c:300)
==26166== by 0x4477E1: main (decoding_encoding.c:642)
==26166==
==26166== Invalid read of size 8
==26166== at 0x68BCA0B: __GI_mempcpy (in /usr/lib/libc-2.18.so)
==26166== by 0x68AC4C6: _IO_file_xsputn@@GLIBC_2.2.5 (in
/usr/lib/libc-2.18.so)
==26166== by 0x68A273C: fwrite (in /usr/lib/libc-2.18.so)
==26166== by 0x4481D0: audio_decode_example.constprop.6
(decoding_encoding.c:310)
==26166== by 0x4477E1: main (decoding_encoding.c:642)
==26166== Address 0x7024e80 is 0 bytes after a block of size 2,304
alloc'd
==26166== at 0x4C29D00: memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==26166== by 0x4C29E17: posix_memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==26166== by 0x9AE6E9: av_malloc (mem.c:94)
==26166== by 0x9A2A57: av_buffer_alloc (buffer.c:70)
==26166== by 0x9A337B: av_buffer_pool_get (buffer.c:305)
==26166== by 0x7A59A6: avcodec_default_get_buffer2 (utils.c:631)
==26166== by 0x7A632E: ff_get_buffer (utils.c:973)
==26166== by 0x6ABB1E: mp_decode_frame (mpegaudiodec_template.c:1608)
==26166== by 0x6ABFED: decode_frame (mpegaudiodec_template.c:1684)
==26166== by 0x7A7DD5: avcodec_decode_audio4 (utils.c:2277)
==26166== by 0x4480C7: audio_decode_example.constprop.6
(decoding_encoding.c:300)
==26166== by 0x4477E1: main (decoding_encoding.c:642)
==26166==
==26166== Invalid read of size 8
==26166== at 0x68BCA0B: __GI_mempcpy (in /usr/lib/libc-2.18.so)
==26166== by 0x68ADE3D: _IO_default_xsputn (in /usr/lib/libc-2.18.so)
==26166== by 0x68AC551: _IO_file_xsputn@@GLIBC_2.2.5 (in
/usr/lib/libc-2.18.so)
==26166== by 0x68A273C: fwrite (in /usr/lib/libc-2.18.so)
==26166== by 0x4481D0: audio_decode_example.constprop.6
(decoding_encoding.c:310)
==26166== by 0x4477E1: main (decoding_encoding.c:642)
==26166== Address 0x7025b80 is not stack'd, malloc'd or (recently) free'd
==26166==
==26166==
==26166== HEAP SUMMARY:
==26166== in use at exit: 40 bytes in 1 blocks
==26166== total heap usage: 1,435 allocs, 1,434 frees, 171,686 bytes
allocated
==26166==
==26166== LEAK SUMMARY:
==26166== definitely lost: 0 bytes in 0 blocks
==26166== indirectly lost: 0 bytes in 0 blocks
==26166== possibly lost: 0 bytes in 0 blocks
==26166== still reachable: 40 bytes in 1 blocks
==26166== suppressed: 0 bytes in 0 blocks
==26166== Rerun with --leak-check=full to see details of leaked memory
==26166==
==26166== For counts of detected and suppressed errors, rerun with: -v
==26166== ERROR SUMMARY: 20636 errors from 3 contexts (suppressed: 2 from
2)
☭
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3355#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list