maintainer-feedback requested: [Bug 267200] multimedia/ffmpeg: Segmentation fault in ff_seek_frame_binary()

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 19 Oct 2022 16:26:13 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-multimedia
(Nobody) <multimedia@FreeBSD.org> for maintainer-feedback:
Bug 267200: multimedia/ffmpeg: Segmentation fault in ff_seek_frame_binary()
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267200



--- Description ---
OS: 13-STABLE n252783

multimedia/ffmpeg:
Options        :
	ALSA	       : on
	AMR_NB	       : off
	AMR_WB	       : off
	AOM	       : off
	ARIBB24        : off
	ASM	       : on
	ASS	       : on
	BS2B	       : off
	CACA	       : off
	CDIO	       : off
	CODEC2	       : off
	DAV1D	       : on
	DC1394	       : off
	DEBUG	       : on
	DOCS	       : off
	DRM	       : off
	FDK_AAC        : off
	FLITE	       : off
	FONTCONFIG     : off
	FREETYPE       : on
	FREI0R	       : on
	FRIBIDI        : off
	GCRYPT	       : off
	GLSLANG        : on
	GME	       : off
	GMP	       : on
	GNUTLS	       : on
	GPL3	       : on
	GSM	       : off
	ICONV	       : on
	ILBC	       : off
	JACK	       : off
	KVAZAAR        : off
	LADSPA	       : on
	LAME	       : on
	LENSFUN        : off
	LIBBLURAY      : off
	LIBRSVG2       : off
	LIBRTMP        : off
	LIBXML2        : off
	LTO	       : off
	LV2	       : off
	MBEDTLS        : off
	MFX	       : off
	MODPLUG        : off
	MYSOFA	       : off
	NONFREE        : on
	OPENAL	       : on
	OPENCL	       : on
	OPENGL	       : on
	OPENH264       : off
	OPENJPEG       : on
	OPENMPT        : on
	OPENSSL        : off
	OPTIMIZED_CFLAGS: on
	OPUS	       : off
	POCKETSPHINX   : off
	PULSEAUDIO     : on
	RABBITMQ       : off
	RAV1E	       : off
	RIST	       : off
	RTCPU	       : on
	RUBBERBAND     : off
	SDL	       : off
	SMB	       : off
	SNAPPY	       : off
	SNDIO	       : off
	SOXR	       : off
	SPEEX	       : on
	SRT	       : off
	SSH	       : off
	SVTAV1	       : off
	SVTHEVC        : off
	SVTVP9	       : off
	TESSERACT      : off
	THEORA	       : on
	TWOLAME        : off
	V4L	       : on
	VAAPI	       : on
	VAPOURSYNTH    : off
	VDPAU	       : on
	VIDSTAB        : off
	VMAF	       : off
	VORBIS	       : on
	VO_AMRWBENC    : on
	VPX	       : on
	VULKAN	       : on
	WEBP	       : off
	X264	       : on
	X265	       : on
	XCB	       : off
	XVID	       : on
	XVIDEO	       : off
	ZIMG	       : off
	ZMQ	       : off
	ZVBI	       : off

When I'm try to play video in BDAV container use multimedia/mpv and seek +5
sec, I'm getting Segmentation fault:

 (+) Video --vid=1 (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=rus (ac3 6ch 48000Hz)
     Audio --aid=2 --alang=rus (ac3 6ch 48000Hz)
     Audio --aid=3 --alang=eng (dts 6ch 48000Hz)
     Audio --aid=4 --alang=eng (ac3 2ch 48000Hz)
     Subs  --sid=1 --slang=rus (hdmv_pgs_subtitle)
     Subs  --sid=2 --slang=ukr (hdmv_pgs_subtitle)
     Subs  --sid=3 --slang=eng (hdmv_pgs_subtitle)
     Subs  --sid=4 --slang=eng (hdmv_pgs_subtitle)
     Subs  --sid=5 --slang=rus (hdmv_pgs_subtitle)
     Subs  --sid=6 --slang=ukr (hdmv_pgs_subtitle)
     Subs  --sid=7 --slang=eng (hdmv_pgs_subtitle)
[New LWP 127957 of process 58190]
Using hardware decoding (vdpau-copy).
[New LWP 127958 of process 58190]
[LWP 127958 of process 58190 exited]
[New LWP 127959 of process 58190]
AO: [oss] 48000Hz stereo 2ch spdif-ac3
VO: [gpu] 1920x1080 nv12
AV: 00:01:00 / 01:31:47 (1%) A-V: -0.046
Thread 15 "mpv/demux" received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
[Switching to LWP 127955 of process 58190]
0x0000000801fcaa03 in ff_seek_frame_binary (s=s@entry=0x834260000,
stream_index=<optimized out>, stream_index@entry=0,
target_ts=target_ts@entry=64865460, flags=flags@entry=0) at
libavformat/utils.c:2175
2175	       if (e->timestamp <= target_ts || e->pos == e->min_distance) {
(gdb) bt
#0  0x0000000801fcaa03 in ff_seek_frame_binary (s=s@entry=0x834260000,
stream_index=<optimized out>, stream_index@entry=0,
target_ts=target_ts@entry=64865460, flags=flags@entry=0) at
libavformat/utils.c:2175
#1  0x0000000801fcba9b in seek_frame_internal (s=0x834260000, stream_index=0,
timestamp=64865460, flags=0) at libavformat/utils.c:2481
#2  av_seek_frame (s=0x834260000, stream_index=<optimized out>,
timestamp=<optimized out>, flags=0) at libavformat/utils.c:2504
#3  0x000000000031a380 in ?? ()
#4  0x000000000031315c in ?? ()
#5  0x000000000030c9fd in ?? ()
#6  0x000000000030bc7e in ?? ()
#7  0x0000000802c219b8 in ?? () from /lib/libthr.so.3
#8  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffde5f1000

The problem only with BDAV container. Video in other containers plays fine.