v4l2: only skip buffer for raw formats

We don't want to skip the first buffer for encoded formats because it
can contain the encoding parameters, in the h264 case, for example.
This commit is contained in:
Wim Taymans 2025-04-23 11:09:54 +02:00
parent f857a50734
commit 957bde02cd

View file

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