comparison vobsub.c @ 5869:412ff784c971

Avoid bogus file not found message if vobsub isn'T forced (autodetect).
author atmos4
date Sat, 27 Apr 2002 20:46:39 +0000
parents 80af8b0589e1
children 7bea806b9c5f
comparison
equal deleted inserted replaced
5868:ad8124c9d462 5869:412ff784c971
767 int 767 int
768 vobsub_parse_ifo(const char *const name, unsigned int *palette, unsigned int *width, unsigned int *height, int force) 768 vobsub_parse_ifo(const char *const name, unsigned int *palette, unsigned int *width, unsigned int *height, int force)
769 { 769 {
770 int res = -1; 770 int res = -1;
771 FILE *fd = fopen(name, "rb"); 771 FILE *fd = fopen(name, "rb");
772 if (fd == NULL) 772 if (fd == NULL) {
773 perror("Can't open IFO file"); 773 if (force)
774 else { 774 perror("Can't open IFO file");
775 } else {
775 // parse IFO header 776 // parse IFO header
776 unsigned char block[0x800]; 777 unsigned char block[0x800];
777 const char *const ifo_magic = "DVDVIDEO-VTS"; 778 const char *const ifo_magic = "DVDVIDEO-VTS";
778 if (fread(block, sizeof(block), 1, fd) != 1) { 779 if (fread(block, sizeof(block), 1, fd) != 1) {
779 if (force) 780 if (force)