Commit ac4cac5e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: fix forced chroma (fix typo and allow emulated chroma)

parent 544af798
...@@ -256,6 +256,13 @@ static int InitVideo (demux_t *demux, int fd) ...@@ -256,6 +256,13 @@ static int InitVideo (demux_t *demux, int fd)
if (dsc == NULL) if (dsc == NULL)
continue; /* ignore VLC-unsupported codec */ continue; /* ignore VLC-unsupported codec */
if (dsc->vlc == reqfourcc)
{
msg_Dbg (demux, " matches the requested format");
selected = dsc;
break; /* always select the requested format if found */
}
if (codec.flags & V4L2_FMT_FLAG_EMULATED) if (codec.flags & V4L2_FMT_FLAG_EMULATED)
{ {
if (native) if (native)
...@@ -264,13 +271,6 @@ static int InitVideo (demux_t *demux, int fd) ...@@ -264,13 +271,6 @@ static int InitVideo (demux_t *demux, int fd)
else else
native = true; native = true;
if (dsc->v4l2 == reqfourcc)
{
msg_Dbg (demux, " matches the requested format");
selected = dsc;
break; /* always select the requested format if found */
}
if (vlc_v4l2_fmt_rank (dsc) > vlc_v4l2_fmt_rank (selected)) if (vlc_v4l2_fmt_rank (dsc) > vlc_v4l2_fmt_rank (selected))
continue; /* ignore if rank is worse */ continue; /* ignore if rank is worse */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment