Commit 49faf2e1 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

* sub.c : fixed a warning.

parent 4a8900b3
......@@ -2,7 +2,7 @@
* sub.c
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
* $Id: sub.c,v 1.22 2003/08/23 22:02:45 hartman Exp $
* $Id: sub.c,v 1.23 2003/08/24 00:36:38 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -243,7 +243,8 @@ char* sub_detect( subtitle_demux_t *p_sub, char *psz_filename)
DIR *p_dir_handle;
struct dirent *p_dir_afile;
char * ppsz_sub_exts[] = { "sub", "srt", "smi", "ssa", NULL};
char *psz_result, *psz_basename, *psz_dir, *psz_file_noext, *psz_extension;
char *psz_result, *psz_basename, *psz_dir = NULL;
char *psz_file_noext, *psz_extension;
int i;
size_t i_dirlen = 0;
......@@ -289,7 +290,7 @@ char* sub_detect( subtitle_demux_t *p_sub, char *psz_filename)
}
else return "";
p_dir_handle = opendir( psz_dir );
p_dir_handle = opendir( psz_dir ? psz_dir : "" );
if( p_dir_handle ) {
int i_found = 0;
......@@ -323,7 +324,6 @@ char* sub_detect( subtitle_demux_t *p_sub, char *psz_filename)
}
closedir( p_dir_handle );
}
}
return "";
}
......
Supports Markdown
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