diff options
author | 2002-12-16 23:27:39 +0000 | |
---|---|---|
committer | 2002-12-16 23:27:39 +0000 | |
commit | 396b7d7e56783840962542bc275fbb31278ace6a (patch) | |
tree | 08a707f4a76cfefcd435d5aaa719802b2286c0e9 /libmpdemux | |
parent | 311670cabad935035633bdc6ad4a0b8ef5e4ee36 (diff) |
handle bogus norm parameter; check for errors when setting norm
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8487 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/tv.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c index cbc820c8e4..2031639940 100644 --- a/libmpdemux/tv.c +++ b/libmpdemux/tv.c @@ -159,21 +159,16 @@ static int open_tv(tvi_handle_t *tvh) tvh->norm = TV_NORM_NTSC; else if (!strcasecmp(tv_param_norm, "secam")) tvh->norm = TV_NORM_SECAM; - else if (!strcasecmp(tv_param_norm, "palnc")) - tvh->norm = TV_NORM_PALNC; - else if (!strcasecmp(tv_param_norm, "palm")) - tvh->norm = TV_NORM_PALM; - else if (!strcasecmp(tv_param_norm, "paln")) - tvh->norm = TV_NORM_PALN; - else if (!strcasecmp(tv_param_norm, "ntscjp")) - tvh->norm = TV_NORM_NTSCJP; else { mp_msg(MSGT_TV, MSGL_V, "Bogus norm parameter, setting PAL.\n"); tvh->norm = TV_NORM_PAL; } mp_msg(MSGT_TV, MSGL_V, "Selected norm: %s\n", tv_param_norm); - funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->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; + } /* limits on w&h are norm-dependent -- JM */ /* set width */ |