Bug 457347 - fix crash in qtav libavfilter with FFMPEG 5
Summary: fix crash in qtav libavfilter with FFMPEG 5
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Video (other bugs)
Version First Reported In: unspecified
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-31 17:23 UTC by Steven Robbins
Modified: 2022-07-31 17:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.0.0
Sentry Crash Report:


Attachments
bug fix (519 bytes, patch)
2022-07-31 17:23 UTC, Steven Robbins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Robbins 2022-07-31 17:23:05 UTC
Created attachment 151031 [details]
bug fix

SUMMARY

When built using FFMPEG 5, the current git master/HEAD crashes while running  tests/video/qtav/tests/codecslist.  

Stack trace:

Thread 1 "qtav-codecslist" received signal SIGSEGV, Segmentation fault.
0x00007ffff3b82cf9 in av_filter_iterate () from /lib/x86_64-linux-gnu/libavfilter.so.8
(gdb) bt
#0  0x00007ffff3b82cf9 in av_filter_iterate () at /lib/x86_64-linux-gnu/libavfilter.so.8
#1  0x00007ffff76ed947 in QtAV::LibAVFilter::registeredFilters(int) (type=0) at /home/steve/Packages/digikam/upstream/core/libs/video/qtav/filter/LibAVFilter.cpp:479
#2  0x00007ffff76ed0b5 in QtAV::LibAVFilter::videoFilters() () at /home/steve/Packages/digikam/upstream/core/libs/video/qtav/filter/LibAVFilter.cpp:327
#3  0x0000555555555bcc in main(int, char**) () at /home/steve/Packages/digikam/upstream/core/tests/video/qtav/tests/codecslist.cpp:64
(gdb) 


The bug is in how LibAVFilter::registeredFilters() calls av_filter_iterate().  Patch attached.
Comment 1 Steven Robbins 2022-07-31 17:25:22 UTC
Note: I followed the ffmeg example code to implement fix.
See https://ffmpeg.org/doxygen/trunk/opt__common_8c_source.html#l00788
Comment 2 Maik Qualmann 2022-07-31 17:32:51 UTC
Git commit ab1b9df72ce045f76a654c9961f6e74f2da7c3a6 by Maik Qualmann.
Committed on 31/07/2022 at 17:31.
Pushed by mqualmann into branch 'master'.

apply patch #151031 from Steven Robbins to fix crash in qtav libavfilter with FFMPEG 5
FIXED-IN: 8.0.0

M  +2    -2    core/libs/video/qtav/filter/LibAVFilter.cpp

https://invent.kde.org/graphics/digikam/commit/ab1b9df72ce045f76a654c9961f6e74f2da7c3a6