[FFmpeg-trac] #7358(avfilter:new): Unable to use Lensfun

FFmpeg trac at avcodec.org
Mon Aug 20 18:25:22 EEST 2018


#7358: Unable to use Lensfun
------------------------------------+------------------------------------
             Reporter:  Zeranoe     |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  important   |                Component:  avfilter
              Version:  git-master  |               Resolution:
             Keywords:  lensfun     |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by cehoyos):

 valgrind shows an invalid read here, I don't know if this is the same
 issue:
 {{{
 $ valgrind ./ffmpeg_g -f lavfi -i testsrc=s=hd1080 -vf
 lensfun=make=Canon:model="Canon EOS 100D":lens_model="Canon EF-S 18-55mm
 f/3.5-5.6 IS STM" -f null -vframes 1 -
 ==27437== Memcheck, a memory error detector
 ==27437== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
 ==27437== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright
 info
 ==27437== Command: ./ffmpeg_g -f lavfi -i testsrc=s=hd1080 -vf
 lensfun=make=Canon:model=Canon\ EOS\ 100D:lens_model=Canon\ EF-S\ 18-55mm\
 f/3.5-5.6\ IS\ STM -f null -vframes 1 -
 ==27437==
 ffmpeg version N-91646-g78d4b6b Copyright (c) 2000-2018 the FFmpeg
 developers
   built with gcc 6.4.0 (GCC)
   configuration: --enable-gpl --enable-gnutls --enable-libxml2 --enable-
 liblensfun --enable-version3
   libavutil      56. 19.100 / 56. 19.100
   libavcodec     58. 23.100 / 58. 23.100
   libavformat    58. 17.103 / 58. 17.103
   libavdevice    58.  4.101 / 58.  4.101
   libavfilter     7. 26.100 /  7. 26.100
   libswscale      5.  2.100 /  5.  2.100
   libswresample   3.  2.100 /  3.  2.100
   libpostproc    55.  2.100 / 55.  2.100
 Input #0, lavfi, from 'testsrc=s=hd1080':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
 Press [q] to stop, [?] for help
 ==27437== Invalid read of size 8
 ==27437==    at 0x7C0F26D: _wordcopy_fwd_dest_aligned (in
 /lib64/libc-2.15.so)
 ==27437==    by 0x7C08E89: __GI_memmove (in /lib64/libc-2.15.so)
 ==27437==    by 0x7C4400D: re_string_reconstruct (in /lib64/libc-2.15.so)
 ==27437==    by 0x7C4D8B8: re_search_internal (in /lib64/libc-2.15.so)
 ==27437==    by 0x7C502E4: regexec@@GLIBC_2.3.4 (in /lib64/libc-2.15.so)
 ==27437==    by 0x68BA86D: _lf_parse_lens_name(char const*, float&,
 float&, float&) (lens.cpp:77)
 ==27437==    by 0x68BB1B8: lfLens::GuessParameters() (lens.cpp:214)
 ==27437==    by 0x68BB68F: lfLens::Check() (lens.cpp:299)
 ==27437==    by 0x68B78E8: _xml_end_element(_GMarkupParseContext*, char
 const*, void*, _GError**) (database.cpp:581)
 ==27437==    by 0x837F4F7: g_markup_parse_context_parse (in
 /usr/lib64/libglib-2.0.so.0.3200.4)
 ==27437==    by 0x68B817C: lfDatabase::Load(char const*, char const*,
 unsigned long) (database.cpp:755)
 ==27437==    by 0x68B5612: lfDatabase::Load(char const*)
 (database.cpp:138)
 ==27437==  Address 0x9932a18 is 24 bytes inside a block of size 30 alloc'd
 ==27437==    at 0x4C2ABED: malloc (in /usr/lib64/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==27437==    by 0x4C2AD6F: realloc (in /usr/lib64/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==27437==    by 0x7C43003: re_string_realloc_buffers (in
 /lib64/libc-2.15.so)
 ==27437==    by 0x7C4D559: re_search_internal (in /lib64/libc-2.15.so)
 ==27437==    by 0x7C502E4: regexec@@GLIBC_2.3.4 (in /lib64/libc-2.15.so)
 ==27437==    by 0x68BA86D: _lf_parse_lens_name(char const*, float&,
 float&, float&) (lens.cpp:77)
 ==27437==    by 0x68BB1B8: lfLens::GuessParameters() (lens.cpp:214)
 ==27437==    by 0x68BB68F: lfLens::Check() (lens.cpp:299)
 ==27437==    by 0x68B78E8: _xml_end_element(_GMarkupParseContext*, char
 const*, void*, _GError**) (database.cpp:581)
 ==27437==    by 0x837F4F7: g_markup_parse_context_parse (in
 /usr/lib64/libglib-2.0.so.0.3200.4)
 ==27437==    by 0x68B817C: lfDatabase::Load(char const*, char const*,
 unsigned long) (database.cpp:755)
 ==27437==    by 0x68B5612: lfDatabase::Load(char const*)
 (database.cpp:138)
 ==27437==
 [Parsed_lensfun_0 @ 0x98f7ec0] Using camera Canon EOS 100D
 [Parsed_lensfun_0 @ 0x98f7ec0] Using lens Canon EF-S 18-55mm f/3.5-5.6 IS
 STM
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf58.17.103
     Stream #0:0: Video: wrapped_avframe, rgb24, 1920x1080 [SAR 1:1 DAR
 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.23.100 wrapped_avframe
 frame=    1 fps=0.2 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 speed=0.00605x
 video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 ==27437==
 ==27437== HEAP SUMMARY:
 ==27437==     in use at exit: 30,766 bytes in 69 blocks
 ==27437==   total heap usage: 50,934 allocs, 50,865 frees, 43,792,462
 bytes allocated
 ==27437==
 ==27437== LEAK SUMMARY:
 ==27437==    definitely lost: 116 bytes in 2 blocks
 ==27437==    indirectly lost: 240 bytes in 10 blocks
 ==27437==      possibly lost: 2,944 bytes in 8 blocks
 ==27437==    still reachable: 27,466 bytes in 49 blocks
 ==27437==         suppressed: 0 bytes in 0 blocks
 ==27437== Rerun with --leak-check=full to see details of leaked memory
 ==27437==
 ==27437== For counts of detected and suppressed errors, rerun with: -v
 ==27437== ERROR SUMMARY: 443 errors from 1 contexts (suppressed: 2 from 2)
 }}}
 All leaks are within the library, I tested lensfun 0.3.2.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7358#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list