LAVFilters icon indicating copy to clipboard operation
LAVFilters copied to clipboard

Crash in ff_mpv_alloc_pic_accessories

Open clsid2 opened this issue 9 months ago • 3 comments

Crash issue with DVD playback. Stacktrace

dxva2 native is used.

I have not been able to reproduce it.

Did not occur before the last big FFmpeg update. So possibly started after buffer pool commit? I see some asserts in alloc_picture regarding dimensions. Maybe a video size change can trigger it?

clsid2 avatar Apr 01 '25 18:04 clsid2

From a user crash dump: Image It seems pic->f is null?

clsid2 avatar Jun 28 '25 21:06 clsid2

pic->f is used before this place already in alloc_picture, which clearly didn't crash.

In general, I'm not interested in chasing random ffmpeg crashes without a local reproduction. Adding random pointer checks is just blind guessing and a cat and mouse game, as the above stack trace shows.

Nevcairiel avatar Jun 28 '25 21:06 Nevcairiel

I understand. The crash reporter redirects to a page asking for samples/feedback for reproduction, but unfortunately I rarely get any useful info.

It appears to be a similar issue as the hevc_refs issue.

For that I indeed added a pointer check that prevents the crash: https://github.com/clsid2/FFmpeg/blob/8c2013b8017b109b069836aa3db16f2eb1a897e2/libavcodec/hevc/refs.c#L227

clsid2 avatar Jun 28 '25 21:06 clsid2