# HG changeset patch # User reimar # Date 1264864523 0 # Node ID 9db0de5db7c808e9c2f0335ce6f018a48edb339e # Parent 4f40782ab5fc4ffd90d829e8e52ebdeb8d7a85b6 100l, initialize file descriptor to -1, not 0. Fixes libdvdread closing stdin if it can't open the file/device. diff -r 4f40782ab5fc -r 9db0de5db7c8 dvd_reader.c --- a/dvd_reader.c Mon Dec 07 03:50:20 2009 +0000 +++ b/dvd_reader.c Sat Jan 30 15:15:23 2010 +0000 @@ -335,7 +335,7 @@ dvd_reader_t *DVDOpen( const char *ppath ) { struct stat fileinfo; - int ret, have_css, retval, cdir = 0; + int ret, have_css, retval, cdir = -1; dvd_reader_t *ret_val = NULL; char *dev_name = NULL; char *path = NULL, *new_path = NULL, *path_copy = NULL;