From: <tsz...@us...> - 2014-05-02 12:28:36
|
Revision: 1291 http://sourceforge.net/p/aqualung/code/1291 Author: tszilagyi Date: 2014-05-02 12:28:33 +0000 (Fri, 02 May 2014) Log Message: ----------- Better error messages when encoder cannot be created The vorbis encoder cannot be initialized for very low bitrates. In these cases a meaningful error message is printed to the console. This is still not the best solution, but better than nothing. Modified Paths: -------------- trunk/src/encoder/enc_vorbis.c trunk/src/encoder/file_encoder.c Modified: trunk/src/encoder/enc_vorbis.c =================================================================== --- trunk/src/encoder/enc_vorbis.c 2014-04-27 20:52:02 UTC (rev 1290) +++ trunk/src/encoder/enc_vorbis.c 2014-05-02 12:28:33 UTC (rev 1291) @@ -88,8 +88,11 @@ vorbis_encode_ctl(&pd->vi, OV_ECTL_RATEMANAGE2_SET, NULL) || vorbis_encode_setup_init(&pd->vi)); - if (ret) + if (ret) { + fprintf(stdout, "vorbisenc_encoder_open(): cannot setup encoding with set params (bps=%d)\n", + mode->bps); return -1; + } vorbis_comment_init(&pd->vc); if (mode->write_meta) { Modified: trunk/src/encoder/file_encoder.c =================================================================== --- trunk/src/encoder/file_encoder.c 2014-04-27 20:52:02 UTC (rev 1290) +++ trunk/src/encoder/file_encoder.c 2014-05-02 12:28:33 UTC (rev 1291) @@ -76,18 +76,18 @@ encoder_t * enc; if (mode->filename == NULL) { - fprintf(stderr, "Warning: filename == NULL passed to file_encoder_open()\n"); + fprintf(stderr, "error: filename == NULL passed to file_encoder_open()\n"); return 1; } enc = encoder_init_v[mode->file_lib](fenc); if (!enc) { - fprintf(stderr, "Warning: error initializing encoder %d.\n", mode->file_lib); + fprintf(stderr, "error initializing encoder %d.\n", mode->file_lib); return 1; } if (enc->open(enc, mode) != 0) { - fprintf(stderr, "Warning: error opening encoder %d.\n", mode->file_lib); + fprintf(stderr, "error opening encoder %d.\n", mode->file_lib); return 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |