Mercurial > libdvdnav.hg
comparison vm/vm.c @ 429:2e6f41e04ca1 src
Do not close file twice.
There is another close further down that will always be reached.
Patch by Reimar Dffinger ^Reimar&Doeffinger*gmx!de#
author | rathann |
---|---|
date | Thu, 03 Oct 2013 22:43:52 +0000 |
parents | 3d942df13d3a |
children | 1c7c804e9c82 |
comparison
equal
deleted
inserted
replaced
428:10c91a9d6a2e | 429:2e6f41e04ca1 |
---|---|
174 fd = open(device, O_RDONLY); | 174 fd = open(device, O_RDONLY); |
175 if (fd > 0) { | 175 if (fd > 0) { |
176 off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET ); | 176 off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET ); |
177 if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) { | 177 if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) { |
178 off = read( fd, data, DVD_VIDEO_LB_LEN ); | 178 off = read( fd, data, DVD_VIDEO_LB_LEN ); |
179 close(fd); | |
180 if (off == ( (off_t) DVD_VIDEO_LB_LEN )) { | 179 if (off == ( (off_t) DVD_VIDEO_LB_LEN )) { |
181 fprintf(MSG_OUT, "libdvdnav: DVD Title: "); | 180 fprintf(MSG_OUT, "libdvdnav: DVD Title: "); |
182 for(i=25; i < 73; i++ ) { | 181 for(i=25; i < 73; i++ ) { |
183 if((data[i] == 0)) break; | 182 if((data[i] == 0)) break; |
184 if((data[i] > 32) && (data[i] < 127)) { | 183 if((data[i] > 32) && (data[i] < 127)) { |