[PATCH 0/7] media: s5p-mfc: fix seeking and some v4l2-compliance failures
From: Shigeaki Asai via B4 Relay
Date: Mon Nov 30 2026 - 08:03:24 EST
On the ODROID-XU4 (Exynos5422), MFC decoding stops after a seek in
Kodi on LibreELEC, which uses the FFmpeg v4l2m2m decoder.
Patches 1, 2 and 4 fix seeking. FFmpeg drains the decoder with
V4L2_DEC_CMD_STOP before a seek and resumes it with V4L2_DEC_CMD_START,
but the driver did not handle this sequence correctly.
(FFmpeg also needs a fix to queue the empty capture buffer again after
a drain. I will send it to FFmpeg separately.)
Patch 3 reports the supported H.264 profiles, so that applications can
use another decoder for profiles that the MFC cannot decode (e.g. High
10).
(FFmpeg does not check this control yet. I will send a patch for it to
FFmpeg separately.)
Patches 5, 6 and 7 fix failures found by v4l2-compliance.
Tested on the ODROID-XU4 (Exynos5422, MFC v8) with a 7.3.4 kernel
(LibreELEC):
- Kodi plays and seeks H.264 and MPEG-2 videos, with no errors or
warnings in dmesg.
- fluster, JVT-AVC_V1 with FFmpeg-H.264-v4l2m2m: 122/135 passed. The
other 13 use features that the MFC does not support (Extended
profile, FMO), are decoded wrongly by the MFC itself, or hit a crop
offset issue in FFmpeg.
- v4l2-compliance 1.32.0: 42/49 passed without this series, 44/49 with
it. The remaining 5 failures come from reading controls and formats
before the stream header is parsed, and from the limit on the number
of instances.
The analysis, the code and the changelogs were prepared with the help
of Claude (Anthropic), an AI assistant. I wrote this cover letter
myself, and Claude checked my English. I reviewed the code and tested
it on the hardware myself.
Signed-off-by: Shigeaki Asai <y-asai.0816@xxxxxxxxxxxx>
---
Shigeaki Asai (7):
media: s5p-mfc: clear the EOS flag when a buffer is queued
media: s5p-mfc: support V4L2_DEC_CMD_START
media: s5p-mfc: report the supported H.264 decoder profiles
media: s5p-mfc: keep the remaining capture buffers queued after a drain
media: s5p-mfc: support VIDIOC_TRY_DECODER_CMD
media: s5p-mfc: allow subscribing to control events
media: s5p-mfc: do not fail V4L2_DEC_CMD_STOP when not streaming
drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 17 ++++--
.../media/platform/samsung/s5p-mfc/s5p_mfc_dec.c | 66 +++++++++++++++++++++-
2 files changed, 76 insertions(+), 7 deletions(-)
---
base-commit: 0b19af378cd5004bdf6bfaf7b3809fbbb0711a9b
change-id: 20261126-s5p-mfc-seek-10faff7c28e3
Best regards,
--
Shigeaki Asai <y-asai.0816@xxxxxxxxxxxx>