[FFmpeg-devel] [PATCH] avfilter: use ff_inlink_make_frame_writable()

Michael Niedermayer michael at niedermayer.cc
Sat Feb 11 02:19:15 EET 2023


On Thu, Feb 09, 2023 at 08:14:16AM +0100, Paul B Mahol wrote:
> New patch attached.

>  avf_abitscope.c       |   11 +++++++++--
>  avf_ahistogram.c      |    9 +++++++--
>  avf_aphasemeter.c     |    9 +++++++--
>  avf_avectorscope.c    |    7 ++++++-
>  avf_showspectrum.c    |    5 ++++-
>  avf_showvolume.c      |    8 ++++++--
>  f_ebur128.c           |   12 +++++++++---
>  f_perms.c             |    4 +++-
>  framesync.c           |    2 +-
>  vf_cover_rect.c       |    9 +++++++--
>  vf_dedot.c            |    2 +-
>  vf_floodfill.c        |    5 ++++-
>  vf_lensfun.c          |    8 +++++++-
>  vf_overlay_cuda.c     |    3 ++-
>  vf_paletteuse.c       |    2 +-
>  vf_photosensitivity.c |    3 ++-
>  vf_repeatfields.c     |   34 +++++++++++++++++++++++++++-------
>  vf_signalstats.c      |   27 +++++++++++++++++++++++----
>  vf_telecine.c         |   13 +++++++++++--
>  vf_vidstabdetect.c    |   12 +++++++++---
>  20 files changed, 146 insertions(+), 39 deletions(-)
> d8b08205d8901abb290c603b9ea5d71264ba1b2d  0001-avfilter-use-ff_inlink_make_frame_writable.patch
> From 86203516a4d38f312ea5319315aa79841a39a45b Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda at gmail.com>
> Date: Mon, 6 Feb 2023 14:57:50 +0100
> Subject: [PATCH] avfilter: use ff_inlink_make_frame_writable()
> 
> Signed-off-by: Paul B Mahol <onemda at gmail.com>

new failure:
-i interlaced_flag_switch.mpeg  -vf repeatfields  -t 2 -vcodec huffyuv -bitexact -y /tmp/file-file-repeatfields.avi

[huffyuv @ 0x386098c0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x38612800] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3a9ed9c0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3a9f4cc0] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3a9fdc00] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3aa06b40] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x3aa0fa80] using huffyuv 2.2.0 or newer interlacing flag
[huffyuv @ 0x16e86bc0] using huffyuv 2.2.0 or newer interlacing flag
Output #0, avi, to '/tmp/file-file-repeatfields.avi':
  Stream #0:0: Video: huffyuv (HFYU / 0x55594648), yuv422p(tv, progressive), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn
    Metadata:
      encoder         : Lavc huffyuv
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    ^M==15866== Invalid read of size 8
==15866==    at 0x12A48B9: av_frame_is_writable (frame.c:525)
==15866==    by 0x2C2787: ff_inlink_make_frame_writable (avfilter.c:1402)
==15866==    by 0x441284: filter_frame (vf_repeatfields.c:134)
==15866==    by 0x2C1910: ff_filter_frame_framed (avfilter.c:948)
==15866==    by 0x2C1F99: ff_filter_frame_to_filter (avfilter.c:1092)
==15866==    by 0x2C21A9: ff_filter_activate_default (avfilter.c:1141)
==15866==    by 0x2C2309: ff_filter_activate (avfilter.c:1299)
==15866==    by 0x2C6F9B: ff_filter_graph_run_once (avfiltergraph.c:1352)
==15866==    by 0x2C84A9: push_frame (buffersrc.c:166)
==15866==    by 0x2C8B16: av_buffersrc_add_frame_flags (buffersrc.c:255)
==15866==    by 0x26FE7D: ifilter_send_frame (ffmpeg.c:2047)
==15866==    by 0x270222: send_frame_to_filters (ffmpeg.c:2133)
==15866==    by 0x270F1A: decode_video (ffmpeg.c:2319)
==15866==    by 0x271E54: process_input_packet (ffmpeg.c:2608)
==15866==    by 0x276C31: process_input (ffmpeg.c:3857)
==15866==    by 0x2770EC: transcode_step (ffmpeg.c:3992)
==15866==    by 0x277230: transcode (ffmpeg.c:4039)
==15866==    by 0x277766: main (ffmpeg.c:4177)
==15866==  Address 0x2eb09d60 is 224 bytes inside a block of size 480 free'd
==15866==    at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15866==    by 0x12B310B: av_free (mem.c:241)
==15866==    by 0x12B3153: av_freep (mem.c:251)
==15866==    by 0x12A3690: av_frame_free (frame.c:105)
==15866==    by 0x2C2885: ff_inlink_make_frame_writable (avfilter.c:1431)
==15866==    by 0x44117F: filter_frame (vf_repeatfields.c:119)
==15866==    by 0x2C1910: ff_filter_frame_framed (avfilter.c:948)
==15866==    by 0x2C1F99: ff_filter_frame_to_filter (avfilter.c:1092)
==15866==    by 0x2C21A9: ff_filter_activate_default (avfilter.c:1141)
==15866==    by 0x2C2309: ff_filter_activate (avfilter.c:1299)
==15866==    by 0x2C6F9B: ff_filter_graph_run_once (avfiltergraph.c:1352)
==15866==    by 0x2C84A9: push_frame (buffersrc.c:166)
==15866==    by 0x2C8B16: av_buffersrc_add_frame_flags (buffersrc.c:255)
==15866==    by 0x26FE7D: ifilter_send_frame (ffmpeg.c:2047)
==15866==    by 0x270222: send_frame_to_filters (ffmpeg.c:2133)
==15866==    by 0x270F1A: decode_video (ffmpeg.c:2319)
==15866==    by 0x271E54: process_input_packet (ffmpeg.c:2608)
==15866==    by 0x276C31: process_input (ffmpeg.c:3857)
==15866==    by 0x2770EC: transcode_step (ffmpeg.c:3992)
==15866==    by 0x277230: transcode (ffmpeg.c:4039)
==15866==  Block was alloc'd at
==15866==    at 0x4C33E76: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15866==    by 0x4C33F91: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15866==    by 0x12B2D92: av_malloc (mem.c:105)
==15866==    by 0x12A3632: av_frame_alloc (frame.c:89)
==15866==    by 0x12A46C7: av_frame_clone (frame.c:463)
==15866==    by 0x441052: filter_frame (vf_repeatfields.c:89)
==15866==    by 0x2C1910: ff_filter_frame_framed (avfilter.c:948)
==15866==    by 0x2C1F99: ff_filter_frame_to_filter (avfilter.c:1092)
==15866==    by 0x2C21A9: ff_filter_activate_default (avfilter.c:1141)
==15866==    by 0x2C2309: ff_filter_activate (avfilter.c:1299)
==15866==    by 0x2C6F9B: ff_filter_graph_run_once (avfiltergraph.c:1352)
==15866==    by 0x2C84A9: push_frame (buffersrc.c:166)
==15866==    by 0x2C8B16: av_buffersrc_add_frame_flags (buffersrc.c:255)
==15866==    by 0x26FE7D: ifilter_send_frame (ffmpeg.c:2047)
==15866==    by 0x270222: send_frame_to_filters (ffmpeg.c:2133)
==15866==    by 0x270F1A: decode_video (ffmpeg.c:2319)
==15866==    by 0x271E54: process_input_packet (ffmpeg.c:2608)
==15866==    by 0x276C31: process_input (ffmpeg.c:3857)
==15866==    by 0x2770EC: transcode_step (ffmpeg.c:3992)
==15866==    by 0x277230: transcode (ffmpeg.c:4039)



[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20230211/2a31aca5/attachment.sig>


More information about the ffmpeg-devel mailing list