"Anton Khirnov " <[email protected]> writes:

> Module: libav
> Branch: master
> Commit: bf174a70cde333eba7e27063f9ce44497108f466
>
> Author:    Anton Khirnov <[email protected]>
> Committer: Anton Khirnov <[email protected]>
> Date:      Wed May 25 17:29:25 2011 +0200
>
> ffmpeg: use new avcodec_open2 and avformat_find_stream_info API.
>
> ---
>
>  ffmpeg.c |   47 ++++++++++++++++++++++-------------------------
>  1 files changed, 22 insertions(+), 25 deletions(-)

This causes some problems:

==28154== Memcheck, a memory error detector
==28154== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==28154== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==28154== Command: ./ffmpeg -v 0 -y -flags +bitexact -idct simple -sws_flags 
+accurate_rnd+bitexact -threads 1 -i /tmp/libav/./tests/data/lavf/lavf.dv -f 
crc /tmp/libav/./tests/data/dv_fmt.lavf.crc
==28154== 
ffmpeg version v0.7-393-g4131bda, Copyright (c) 2000-2011 the Libav developers
  built on Jul 13 2011 22:41:13 with gcc 4.5.2
  configuration: --samples=/misc/samples/fate --enable-gpl --cpu=core2 
--enable-vaapi
  libavutil    51.  8. 0 / 51.  8. 0
  libavcodec   53.  5. 0 / 53.  5. 0
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  4. 0 /  2.  4. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  52.  0. 0 / 52.  0. 0
==28154== Invalid read of size 8
==28154==    at 0x78B68B: avcodec_open2 (utils.c:484)
==28154==    by 0x4E772D: avformat_find_stream_info (utils.c:2089)
==28154==    by 0x43803A: opt_input_file (ffmpeg.c:3266)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154==  Address 0x6457b08 is 0 bytes after a block of size 8 alloc'd
==28154==    at 0x4C276BF: memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x4C27817: posix_memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x939241: av_mallocz (mem.c:83)
==28154==    by 0x43CDF3: setup_find_stream_info_opts (cmdutils.c:816)
==28154==    by 0x43801B: opt_input_file (ffmpeg.c:3261)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154== 
==28154== Invalid read of size 8
==28154==    at 0x933119: av_dict_free (dict.c:103)
==28154==    by 0x78B70B: avcodec_open2 (utils.c:635)
==28154==    by 0x4E772D: avformat_find_stream_info (utils.c:2089)
==28154==    by 0x43803A: opt_input_file (ffmpeg.c:3266)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154==  Address 0x6457b08 is 0 bytes after a block of size 8 alloc'd
==28154==    at 0x4C276BF: memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x4C27817: posix_memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x939241: av_mallocz (mem.c:83)
==28154==    by 0x43CDF3: setup_find_stream_info_opts (cmdutils.c:816)
==28154==    by 0x43801B: opt_input_file (ffmpeg.c:3261)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154== 
==28154== Invalid read of size 8
==28154==    at 0x9391D4: av_freep (mem.c:143)
==28154==    by 0x78B70B: avcodec_open2 (utils.c:635)
==28154==    by 0x4E772D: avformat_find_stream_info (utils.c:2089)
==28154==    by 0x43803A: opt_input_file (ffmpeg.c:3266)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154==  Address 0x6457b08 is 0 bytes after a block of size 8 alloc'd
==28154==    at 0x4C276BF: memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x4C27817: posix_memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x939241: av_mallocz (mem.c:83)
==28154==    by 0x43CDF3: setup_find_stream_info_opts (cmdutils.c:816)
==28154==    by 0x43801B: opt_input_file (ffmpeg.c:3261)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154== 
==28154== Invalid write of size 8
==28154==    at 0x9391DC: av_freep (mem.c:151)
==28154==    by 0x78B70B: avcodec_open2 (utils.c:635)
==28154==    by 0x4E772D: avformat_find_stream_info (utils.c:2089)
==28154==    by 0x43803A: opt_input_file (ffmpeg.c:3266)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154==  Address 0x6457b08 is 0 bytes after a block of size 8 alloc'd
==28154==    at 0x4C276BF: memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x4C27817: posix_memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x939241: av_mallocz (mem.c:83)
==28154==    by 0x43CDF3: setup_find_stream_info_opts (cmdutils.c:816)
==28154==    by 0x43801B: opt_input_file (ffmpeg.c:3261)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154== 
==28154== Invalid write of size 8
==28154==    at 0x78B711: avcodec_open2 (utils.c:636)
==28154==    by 0x4E772D: avformat_find_stream_info (utils.c:2089)
==28154==    by 0x43803A: opt_input_file (ffmpeg.c:3266)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154==  Address 0x6457b08 is 0 bytes after a block of size 8 alloc'd
==28154==    at 0x4C276BF: memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x4C27817: posix_memalign (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28154==    by 0x939241: av_mallocz (mem.c:83)
==28154==    by 0x43CDF3: setup_find_stream_info_opts (cmdutils.c:816)
==28154==    by 0x43801B: opt_input_file (ffmpeg.c:3261)
==28154==    by 0x43B8E0: parse_options (cmdutils.c:271)
==28154==    by 0x43AA1C: main (ffmpeg.c:4407)
==28154== 
[dv @ 0x6378b80] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from '/tmp/libav/./tests/data/lavf/lavf.dv':
  Duration: 00:00:01.00, start: 0.000000, bitrate: 28800 kb/s
    Stream #0.0: Video: dvvideo, yuv420p, 720x576, 28800 kb/s, PAR 16:15 DAR 
4:3, 25 tbr, 25 tbn, 25 tbc
    Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[buffer @ 0x64aa360] w:720 h:576 pixfmt:yuv420p
Output #0, crc, to '/tmp/libav/./tests/data/dv_fmt.lavf.crc':
  Metadata:
    encoder         : Lavf53.2.0
    Stream #0.0: Video: rawvideo, yuv420p, 720x576 [PAR 16:15 DAR 4:3], q=2-31, 
200 kb/s, 90k tbn, 25 tbc
    Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press ctrl-c to stop encoding
frame=   25 fps= 13 q=0.0 Lsize=       0kB time=1.00 bitrate=   0.1kbits/s    
video:15188kB audio:188kB global headers:0kB muxing overhead -99.999905%
==28154== 
==28154== HEAP SUMMARY:
==28154==     in use at exit: 0 bytes in 0 blocks
==28154==   total heap usage: 414 allocs, 414 frees, 36,206,318 bytes allocated
==28154== 
==28154== All heap blocks were freed -- no leaks are possible
==28154== 
==28154== For counts of detected and suppressed errors, rerun with: -v
==28154== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 4 from 4)

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to