[FFmpeg-devel] [PATCH 27/31] fftools/ffmpeg_dec: stop passing InputStream to dec_open()
Michael Niedermayer
michael at niedermayer.cc
Thu Jan 25 03:19:36 EET 2024
On Wed, Jan 24, 2024 at 09:16:57AM +0100, Anton Khirnov wrote:
> ---
> fftools/ffmpeg.h | 3 ++-
> fftools/ffmpeg_dec.c | 50 +++++++++++++++++++++++++++---------------
> fftools/ffmpeg_demux.c | 4 +++-
> 3 files changed, 37 insertions(+), 20 deletions(-)
This causes segfaults:
(ill mail you the sample)
Metadata:
creation_time : 1999-10-07T10:13:38.000000Z
Duration: 00:00:17.54, start: 0.000000, bitrate: 1980 kb/s
Stream #0:0[0x1](eng): Video: qtrle (rle / 0x20656C72), none, 310x280, 438202 kb/s, 25 fps, 25 tbr, 600 tbn (default)
Metadata:
creation_time : 1999-10-07T10:13:38.000000Z
handler_name : Apple Video Media Handler
vendor_id : appl
encoder : Animation
[qtrle @ 0x16a2bf40] Unsupported colorspace: 108 bits/sample?
==24457== at 0x13E0719: VALGRIND_PRINTF_BACKTRACE (valgrind.h:6303)
==24457== by 0x13E1318: av_log_default_callback (log.c:404)
==24457== by 0x13E15BF: av_vlog (log.c:439)
==24457== by 0x13E141E: av_log (log.c:418)
==24457== by 0xC7C031: qtrle_decode_init (qtrle.c:434)
==24457== by 0x88AF88: avcodec_open2 (avcodec.c:337)
==24457== by 0x2448EE: dec_open (ffmpeg_dec.c:1024)
==24457== by 0x2486D7: ist_use (ffmpeg_demux.c:938)
==24457== by 0x248835: ist_filter_add (ffmpeg_demux.c:973)
==24457== by 0x253BC5: ifilter_bind_ist (ffmpeg_filter.c:676)
==24457== by 0x254C21: init_simple_filtergraph (ffmpeg_filter.c:1072)
==24457== by 0x26ADAB: ost_add (ffmpeg_mux_init.c:1444)
==24457== by 0x26B491: map_auto_video (ffmpeg_mux_init.c:1550)
==24457== by 0x26C3A1: create_streams (ffmpeg_mux_init.c:1858)
==24457== by 0x270A6C: of_open (ffmpeg_mux_init.c:3091)
==24457== by 0x274D48: open_files (ffmpeg_opt.c:1333)
==24457== by 0x274F74: ffmpeg_parse_options (ffmpeg_opt.c:1387)
==24457== by 0x289391: main (ffmpeg.c:1032)
[vist#0:0/qtrle @ 0x16a25e80] [dec:qtrle @ 0x16a2b9c0] Error while opening decoder: Invalid data found when processing input
==24457== at 0x13E0719: VALGRIND_PRINTF_BACKTRACE (valgrind.h:6303)
==24457== by 0x13E1318: av_log_default_callback (log.c:404)
==24457== by 0x13E15BF: av_vlog (log.c:439)
==24457== by 0x13E141E: av_log (log.c:418)
==24457== by 0x24494E: dec_open (ffmpeg_dec.c:1025)
==24457== by 0x2486D7: ist_use (ffmpeg_demux.c:938)
==24457== by 0x248835: ist_filter_add (ffmpeg_demux.c:973)
==24457== by 0x253BC5: ifilter_bind_ist (ffmpeg_filter.c:676)
==24457== by 0x254C21: init_simple_filtergraph (ffmpeg_filter.c:1072)
==24457== by 0x26ADAB: ost_add (ffmpeg_mux_init.c:1444)
==24457== by 0x26B491: map_auto_video (ffmpeg_mux_init.c:1550)
==24457== by 0x26C3A1: create_streams (ffmpeg_mux_init.c:1858)
==24457== by 0x270A6C: of_open (ffmpeg_mux_init.c:3091)
==24457== by 0x274D48: open_files (ffmpeg_opt.c:1333)
==24457== by 0x274F74: ffmpeg_parse_options (ffmpeg_opt.c:1387)
==24457== by 0x289391: main (ffmpeg.c:1032)
==24457==
==24457== Process terminating with default action of signal 11 (SIGSEGV)
==24457== Bad permissions for mapped region at address 0x1B68D28
==24457== at 0x13E45C9: av_freep (mem.c:250)
==24457== by 0x241E09: dec_free (ffmpeg_dec.c:108)
==24457== by 0x2449D4: dec_open (ffmpeg_dec.c:1041)
==24457== by 0x2486D7: ist_use (ffmpeg_demux.c:938)
==24457== by 0x248835: ist_filter_add (ffmpeg_demux.c:973)
==24457== by 0x253BC5: ifilter_bind_ist (ffmpeg_filter.c:676)
==24457== by 0x254C21: init_simple_filtergraph (ffmpeg_filter.c:1072)
==24457== by 0x26ADAB: ost_add (ffmpeg_mux_init.c:1444)
==24457== by 0x26B491: map_auto_video (ffmpeg_mux_init.c:1550)
==24457== by 0x26C3A1: create_streams (ffmpeg_mux_init.c:1858)
==24457== by 0x270A6C: of_open (ffmpeg_mux_init.c:3091)
==24457== by 0x274D48: open_files (ffmpeg_opt.c:1333)
==24457== by 0x274F74: ffmpeg_parse_options (ffmpeg_opt.c:1387)
==24457== by 0x289391: main (ffmpeg.c:1032)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240125/12ace6b7/attachment.sig>
More information about the ffmpeg-devel
mailing list