v4l2: Re-enable first buffer skip for jpeg types

The workaround is typically needed with usb-cameras using jpeg streams.
Re-enabling the skip shouldn't affect what the commit was trying to do,
i.e. fix encoded streams like h264 etc.

Fixes: bcf0c0cf8 (v4l2: only skip buffer for raw formats)
This commit is contained in:
Robert Mader 2025-05-15 21:38:35 +02:00 committed by Wim Taymans
parent 1e18cded75
commit e387772dc2

View file

@ -1873,7 +1873,9 @@ static int spa_v4l2_stream_on(struct impl *this)
spa_log_debug(this->log, "starting");
if (port->current_format.media_subtype == SPA_MEDIA_SUBTYPE_raw)
if (port->current_format.media_subtype == SPA_MEDIA_SUBTYPE_raw ||
port->current_format.media_subtype == SPA_MEDIA_SUBTYPE_mjpg ||
port->current_format.media_subtype == SPA_MEDIA_SUBTYPE_jpeg)
port->first_buffer = true;
else
port->first_buffer = false;