[vlc-commits] Select V4L2 input before standard as per specification

Rémi Denis-Courmont git at videolan.org
Thu Sep 1 20:17:47 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep  1 20:21:31 2011 +0300| [58794a90a38c018ff4ab06e7f0937318dfd80ca9] | committer: Rémi Denis-Courmont

Select V4L2 input before standard as per specification

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

 modules/access/v4l2.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index 3e87d6c..a896887 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -1552,6 +1552,14 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
     }
 #endif
 
+    /* Select input */
+    if( v4l2_ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 )
+    {
+        msg_Err( p_obj, "cannot set input %u: %m", p_sys->i_selected_input );
+        goto error;
+    }
+    msg_Dbg( p_obj, "input set to %u", p_sys->i_selected_input );
+
     /* Select standard */
     bool bottom_first;
     const char *stdname = p_sys->psz_standard;
@@ -1626,15 +1634,6 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
         msg_Dbg( p_obj, "tuner audio mode set" );
     }
 
-    /* Select input */
-
-    if( v4l2_ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 )
-    {
-        msg_Err( p_obj, "cannot set input %u: %m", p_sys->i_selected_input );
-        goto error;
-    }
-    msg_Dbg( p_obj, "input set to %u", p_sys->i_selected_input );
-
     /* Set audio input */
 
     if( p_sys->i_audio > 0 )



More information about the vlc-commits mailing list