[vlc-commits] v4l2: fix forced chroma (fix typo and allow emulated chroma)

Rémi Denis-Courmont git at videolan.org
Fri Mar 23 22:01:20 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 23 22:44:23 2012 +0200| [ac4cac5e6835e84e8535bbb7f379e4c6c03d2ad4] | committer: Rémi Denis-Courmont

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac4cac5e6835e84e8535bbb7f379e4c6c03d2ad4
---

 modules/access/v4l2/demux.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index ac401b0..792d4a9 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -256,6 +256,13 @@ static int InitVideo (demux_t *demux, int fd)
         if (dsc == NULL)
             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 (native)
@@ -264,13 +271,6 @@ static int InitVideo (demux_t *demux, int fd)
         else
             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))
             continue; /* ignore if rank is worse */
 



More information about the vlc-commits mailing list