Commit e8e9297e authored by Benjamin Pracht's avatar Benjamin Pracht

* "frequency=" is channel frequency in kHz again

* fix  a segfault when "/dev/video0"  or "norm=" were last  arguments of
the command line
parent ad2b2b27
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pvr.c * pvr.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: pvr.c,v 1.5 2003/07/22 20:25:07 bigben Exp $ * $Id: pvr.c,v 1.6 2003/07/24 18:30:03 bigben Exp $
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -144,7 +144,8 @@ static int Open( vlc_object_t * p_this ) ...@@ -144,7 +144,8 @@ static int Open( vlc_object_t * p_this )
char *psz_parser_init; char *psz_parser_init;
psz_parser += strlen( "norm=" ); psz_parser += strlen( "norm=" );
psz_parser_init = psz_parser; psz_parser_init = psz_parser;
while ( *psz_parser != ':' && *psz_parser != ',' ) while ( *psz_parser != ':' && *psz_parser != ','
&& *psz_parser != '\0' )
{ {
psz_parser++; psz_parser++;
} }
...@@ -180,8 +181,8 @@ static int Open( vlc_object_t * p_this ) ...@@ -180,8 +181,8 @@ static int Open( vlc_object_t * p_this )
strlen( "frequency=" ) ) ) strlen( "frequency=" ) ) )
{ {
p_sys->i_frequency = p_sys->i_frequency =
1000 * strtol( psz_parser + strlen( "frequency=" ), strtol( psz_parser + strlen( "frequency=" ),
&psz_parser, 0 ) / 16; &psz_parser, 0 );
} }
else if( !strncmp( psz_parser, "framerate=", else if( !strncmp( psz_parser, "framerate=",
strlen( "framerate=" ) ) ) strlen( "framerate=" ) ) )
...@@ -233,7 +234,8 @@ static int Open( vlc_object_t * p_this ) ...@@ -233,7 +234,8 @@ static int Open( vlc_object_t * p_this )
{ {
char *psz_parser_init; char *psz_parser_init;
psz_parser_init = psz_parser; psz_parser_init = psz_parser;
while ( *psz_parser != ':' && *psz_parser != ',' ) while ( *psz_parser != ':' && *psz_parser != ','
&& *psz_parser != '\0' )
{ {
psz_parser++; psz_parser++;
} }
......
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