The update to FFmpeg 4.2 has introduced a regression in MPlayer. For (at least) the ubiquitous H.264 videos in MKV containers, seeking in MPlayer is broken, e.g. when jumping back and forth with the arrow keys. Effects are desynchronized faulty video and failure to seek. This appears to affect the parts of the video file beyond 2GB, seeking below is fine. MPlayer prints warnings like
[matroska,webm @ 0x801b86f40]Element at 0x81e78160 ending at 0x81ff3e32 exceeds containing master element ending at 0x7e2ea500
multimedia/mpv is not affected, so this appears to be a specific problem in MPlayer.
FreeBSD 12.0-STABLE r350672 GENERIC amd64
Compiled from ports with the default options.
I was mistaken. This is indeed a bug in multimedia/ffmpeg.
Brad Smith provided a fix on OpenBSD:
"matroska_reset_status (a function that is used during seeking (among other things)) used an int for the return value of avio_seek which returns an int64_t. Checking the return value then indicated an error even though the seek was successfull for targets in the range of 2GB-4GB, 6GB-8GB, ... This error implied that the status hasn't been reset and in particular, the old level was still considered to be in force, so that ebml_parse returned errors because the newly parsed elements were of course not contained in the previously active and still wrongly considered active master element any more."
Created attachment 206641 [details]
avformat/matroskadec: Fix seeking
Fix by Brad Smith (originally for OpenBSD).
A commit references this bug:
Date: Sat Aug 17 21:04:33 UTC 2019
New revision: 509174
multimedia/ffmpeg: unbreak mkv seeking beyond 2gb after r508216
Reported by: naddy
Obtained from: upstream (release/4.2 branch)