[FFmpeg-cvslog] r18005 - trunk/libavformat/rmdec.c
Vitor Sessak
vitor1001
Mon Mar 16 21:00:31 CET 2009
Ronald S. Bultje wrote:
> Hi,
>
> On Mon, Mar 16, 2009 at 1:08 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> OK, I'll look at it.
>
> My short and very inconclusive answer is that I don't know because
> valgrind-for-macosx refuses to compile on my OSX10.4. Can anyone do a
> quick valgrind run on that testsample that fails
> (http://samples.mplayerhq.hu/real/AC-14_4/ and the file is called
> ra3_in_rm_file.rm) and show me the results? I don't see any failures
> here on any of my testfiles.
It segfaults here before exiting (but gives the correct md5sum):
vitor at vitor:/tmp$ gdb --args ~/ffmpeg/ffmpeg/ffmpeg_g -v 0 -i
ra3_in_rm_file.rm -f s16le /dev/null
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /home/vitor/ffmpeg/ffmpeg/ffmpeg_g -v 0 -i
ra3_in_rm_file.rm -f s16le /dev/null
FFmpeg version SVN-r18017, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 50. 0. 0 / 50. 0. 0
libavcodec 52.21. 0 / 52.21. 0
libavformat 52.31. 1 / 52.31. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Mar 16 2009 20:54:46, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, rm, from 'ra3_in_rm_file.rm':
Duration: 01:07:04.92, start: 0.000000, bitrate: 0 kb/s
Stream #0.0: Audio: real_144, 8000 Hz, mono, s16, 8 kb/s
File '/dev/null' already exists. Overwrite ? [y/N] y
All Things Considered 11/17/98
http://www.npr.org/
National Public Radio 1998
Output #0, s16le, to '/dev/null':
Stream #0.0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[real_144 @ 0x891ff80]Frame too small (17 bytes). Truncated file?
Program received signal SIGSEGV, Segmentation fault.
0x080c68ff in rm_read_packet (s=0x8916ac0, pkt=0xbf8a1ab0)
at libavformat/rmdec.c:777
777 st = s->streams[i];
(gdb) print i
$1 = 143785376
(gdb) bt
#0 0x080c68ff in rm_read_packet (s=0x8916ac0, pkt=0xbf8a1ab0)
at libavformat/rmdec.c:777
#1 0x08060e8c in av_read_packet (s=0x8916ac0, pkt=0xbf8a1ab0)
at libavformat/utils.c:591
#2 0x080614a2 in av_read_frame_internal (s=0x8916ac0, pkt=0xbf8a1d0c)
at libavformat/utils.c:1001
#3 0x08052b5b in main (argc=0, argv=0x1) at ffmpeg.c:2127
(gdb)
And using valgrind:
vitor at vitor:/tmp$ valgrind ~/ffmpeg/ffmpeg/ffmpeg_g -v 0 -i
ra3_in_rm_file.rm -f s16le -y /dev/null
==13294== Memcheck, a memory error detector.
==13294== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==13294== Using LibVEX rev 1804, a library for dynamic binary translation.
==13294== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==13294== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation
framework.
==13294== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==13294== For more details, rerun with: -v
==13294==
FFmpeg version SVN-r18017, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 50. 0. 0 / 50. 0. 0
libavcodec 52.21. 0 / 52.21. 0
libavformat 52.31. 1 / 52.31. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Mar 16 2009 20:54:46, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, rm, from 'ra3_in_rm_file.rm':
Duration: 01:07:04.92, start: 0.000000, bitrate: 0 kb/s
Stream #0.0: Audio: real_144, 8000 Hz, mono, s16, 8 kb/s
All Things Considered 11/17/98
http://www.npr.org/
National Public Radio 1998
Output #0, s16le, to '/dev/null':
Stream #0.0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[real_144 @ 0x41bdfb0]Frame too small (17 bytes). Truncated file?
==13294== Use of uninitialised value of size 4
==13294== at 0x80C68FF: rm_read_packet (rmdec.c:777)
==13294==
==13294== Invalid read of size 4
==13294== at 0x80C68FF: rm_read_packet (rmdec.c:777)
==13294== Address 0x148ab3f8 is not stack'd, malloc'd or (recently) free'd
==13294==
==13294== Process terminating with default action of signal 11 (SIGSEGV)
==13294== Access not within mapped region at address 0x148AB3F8
==13294== at 0x80C68FF: rm_read_packet (rmdec.c:777)
==13294==
==13294== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 13 from 1)
==13294== malloc/free: in use at exit: 1,347,504 bytes in 45 blocks.
==13294== malloc/free: 11,410 allocs, 11,365 frees, 3,716,944 bytes
allocated.
==13294== For counts of detected errors, rerun with: -v
==13294== searching for pointers to 45 not-freed blocks.
==13294== checked 5,012,956 bytes.
==13294==
==13294== LEAK SUMMARY:
==13294== definitely lost: 0 bytes in 0 blocks.
==13294== possibly lost: 0 bytes in 0 blocks.
==13294== still reachable: 1,347,504 bytes in 45 blocks.
==13294== suppressed: 0 bytes in 0 blocks.
==13294== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault
-Vitor
More information about the ffmpeg-cvslog
mailing list