changeset 18073:8ceb31f028ee

make failures during e.g. setting the TV norm non-fatal. Makes some (crappy *g*) USB cameras work with MPlayer.
author reimar
date Tue, 11 Apr 2006 10:19:53 +0000
parents 284751bccd04
children a491d7628cdc
files libmpdemux/tv.c libmpdemux/tvi_v4l.c libmpdemux/tvi_v4l2.c
diffstat 3 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/tv.c	Mon Apr 10 16:18:17 2006 +0000
+++ b/libmpdemux/tv.c	Tue Apr 11 10:19:53 2006 +0000
@@ -224,7 +224,6 @@
 	mp_msg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", tv_param_normid);
 	if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tv_param_normid) != TVI_CONTROL_TRUE) {
 	    mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
-	    return 0;
 	}
     } else {
 #endif
@@ -234,7 +233,6 @@
     mp_msg(MSGT_TV, MSGL_V, "Selected norm: %s\n", tv_param_norm);
     if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
 	mp_msg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
-	return 0;
     }
 #ifdef HAVE_TV_V4L2
     }
--- a/libmpdemux/tvi_v4l.c	Mon Apr 10 16:18:17 2006 +0000
+++ b/libmpdemux/tvi_v4l.c	Tue Apr 11 10:19:53 2006 +0000
@@ -799,7 +799,6 @@
     if (ioctl(priv->video_fd, VIDIOCSPICT, &priv->picture) == -1)
     {
 	mp_msg(MSGT_TV, MSGL_ERR, "ioctl set picture failed: %s\n", strerror(errno));
-	return(0);
     }
 
     if ( !tv_param_mjpeg )
--- a/libmpdemux/tvi_v4l2.c	Mon Apr 10 16:18:17 2006 +0000
+++ b/libmpdemux/tvi_v4l2.c	Tue Apr 11 10:19:53 2006 +0000
@@ -972,10 +972,11 @@
 	return 0;
     }
 
-    if (getfmt(priv) < 0 || getstd(priv) < 0) {
+    if (getfmt(priv) < 0) {
 	uninit(priv);
 	return 0;
     }
+    getstd(priv);
     /*
     ** if this device has got a tuner query it's settings
     ** otherwise set some nice defaults