Changeset 234 for libmpc/branches/r2d/mpc2sv8
- Timestamp:
- 03/22/07 20:58:37 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/mpc2sv8/mpc2sv8.c
r233 r234 103 103 104 104 if (si.stream_version >= 8) { 105 fprintf(stderr, "Error : this file is already a sv8 file\n"); 106 mpc_demux_exit(demux); 107 mpc_reader_exit_stdio(&reader); 108 return MPC_STATUS_INVALIDSV; 105 fprintf(stderr, "Error : the file \"%s\" is already a sv8 file\n", argv[1]); 106 exit(MPC_STATUS_INVALIDSV); 109 107 } 110 108 111 109 mpc_encoder_init(&e, si.samples, 6, 1); 110 e.outputFile = fopen( argv[2], "rb" ); 111 if ( e.outputFile != 0 ) { 112 fprintf(stderr, "Error : output file \"%s\" already exists\n", argv[2]); 113 exit(MPC_STATUS_FILE); 114 } 112 115 e.outputFile = fopen( argv[2], "w+b" ); 113 116 e.MS_Channelmode = si.ms; … … 120 123 size_t tmp_size = fread(buf, 1, mini(TMP_BUF_SIZE, r_size), in_file); 121 124 if (fwrite(buf, 1, tmp_size, e.outputFile) != tmp_size) { 122 fprintf(stderr, "Error writing to target file \n");123 exit( !MPC_STATUS_OK);125 fprintf(stderr, "Error writing to target file : \"%s\"\n", argv[2]); 126 exit(MPC_STATUS_FILE); 124 127 } 125 128 r_size -= tmp_size;
Note: See TracChangeset
for help on using the changeset viewer.