Changeset 4014:2fee6bf2dc0c in roaraudio
- Timestamp:
- 07/01/10 20:04:36 (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roarclients
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r4012 r4014 736 736 } 737 737 738 if ( roar_stream_meta_set(con, &s, mode_i, &meta) == -1 ) 738 if ( roar_stream_meta_set(con, &s, mode_i, &meta) == -1 ) { 739 fclose(in); 739 740 return -1; 741 } 740 742 } 741 743 … … 801 803 return -1; 802 804 805 if ( (len = roar_stream_meta_list(con, &s, types, ROAR_META_MAX_PER_STREAM)) == -1 ) 806 return -1; 807 803 808 if ( (out = fopen(file, "w")) == NULL ) 804 return -1;805 806 if ( (len = roar_stream_meta_list(con, &s, types, ROAR_META_MAX_PER_STREAM)) == -1 )807 809 return -1; 808 810 -
roarclients/roardtmf.c
r3517 r4014 170 170 */ 171 171 172 if ( (buf = malloc((len = bits*samples/8))) == NULL )172 if ( (buf = roar_mm_malloc((len = bits*samples/8))) == NULL ) 173 173 return 4; 174 174 175 175 if ( roar_vio_simple_stream(&stream, rate, 1, bits, codec, server, ROAR_DIR_PLAY, name) == -1 ) { 176 176 fprintf(stderr, "Error: can not start playback\n"); 177 roar_mm_free(buf); 177 178 return 1; 178 179 } … … 184 185 continue; 185 186 186 if ( calc(buf, len, rate, c) == -1 ) 187 if ( calc(buf, len, rate, c) == -1 ) { 188 roar_mm_free(buf); 187 189 return 5; 190 } 188 191 roar_vio_write(&stream, buf, len); 189 192 } 190 193 191 194 roar_vio_close(&stream); 195 196 roar_mm_free(buf); 192 197 193 198 return 0; -
roarclients/roarfctest.c
r3812 r4014 102 102 #endif 103 103 104 if ( roar_stream_new(stream, rate, channels, bits, codec) == -1 ) 104 if ( roar_stream_new(stream, rate, channels, bits, codec) == -1 ) { 105 pclose(rmsout); 105 106 return 2; 107 } 106 108 107 109 if ( roardsp_filter_init(filt, stream, ROARDSP_FILTER_DCBLOCK) == -1 ) { 108 110 ROAR_ERR("main(*): roardsp_filter_init() failed: errno=%s(%i)", strerror(errno), errno); 111 pclose(rmsout); 109 112 return 1; 110 113 } … … 117 120 if ( roardsp_filter_init(filt+1, stream, ROARDSP_FILTER_HIGHP) == -1 ) { 118 121 ROAR_ERR("main(*): roardsp_filter_init() failed: errno=%s(%i)", strerror(errno), errno); 122 pclose(rmsout); 119 123 return 1; 120 124 } … … 125 129 if ( roardsp_filter_init(filt+2, stream, ROARDSP_FILTER_AMP) == -1 ) { 126 130 ROAR_ERR("main(*): roardsp_filter_init() failed: errno=%s(%i)", strerror(errno), errno); 131 pclose(rmsout); 127 132 return 1; 128 133 } … … 211 216 212 217 if ( rmsout != NULL ) 213 fclose(rmsout);218 pclose(rmsout); 214 219 215 220 return 0; -
roarclients/roarvorbis.c
r3843 r4014 251 251 if ( in == NULL ) { 252 252 roar_disconnect(&con); 253 fclose(in); 253 254 return 1; 254 255 } … … 261 262 fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n"); 262 263 roar_disconnect(&con); 264 fclose(in); 263 265 return 1; 264 266 } … … 269 271 if ( roar_vio_open_dstr(&vclt, vcltfile, &def, 1) == -1 ) { 270 272 fprintf(stderr, "Error: can not open file: %s: %s\n", k, strerror(errno)); 273 fclose(in); 271 274 return 1; 272 275 } … … 280 283 281 284 if ( last_section != current_section ) 282 if ( update_stream(&con, &s, &vio, &vf, file, &info, vcltfile == NULL ? NULL : &vclt) == -1 ) 285 if ( update_stream(&con, &s, &vio, &vf, file, &info, vcltfile == NULL ? NULL : &vclt) == -1 ) { 286 fclose(in); 283 287 return 1; 288 } 284 289 285 290 last_section = current_section; … … 306 311 } 307 312 313 fclose(in); 314 308 315 return 0; 309 316 #endif
Note: See TracChangeset
for help on using the changeset viewer.