diff options
Diffstat (limited to 'src/encoder')
-rw-r--r-- | src/encoder/flac_encoder.c | 6 | ||||
-rw-r--r-- | src/encoder/vorbis_encoder.c | 2 | ||||
-rw-r--r-- | src/encoder/wave_encoder.c | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/encoder/flac_encoder.c b/src/encoder/flac_encoder.c index 4312fedb2..a7d35597e 100644 --- a/src/encoder/flac_encoder.c +++ b/src/encoder/flac_encoder.c @@ -55,7 +55,7 @@ static bool flac_encoder_configure(struct flac_encoder *encoder, const struct config_param *param, G_GNUC_UNUSED GError **error) { - encoder->compression = config_get_block_unsigned(param, + encoder->compression = config_get_block_unsigned(param, "compression", 5); return true; @@ -218,7 +218,7 @@ flac_encoder_open(struct encoder *_encoder, struct audio_format *audio_format, if (init_status != FLAC__STREAM_ENCODER_OK) { g_set_error(error, flac_encoder_quark(), 0, - "failed to initialize encoder: %s\n", + "failed to initialize encoder: %s\n", FLAC__StreamEncoderStateString[init_status]); flac_encoder_close(_encoder); return false; @@ -234,7 +234,7 @@ flac_encoder_open(struct encoder *_encoder, struct audio_format *audio_format, if(init_status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) { g_set_error(error, flac_encoder_quark(), 0, - "failed to initialize encoder: %s\n", + "failed to initialize encoder: %s\n", FLAC__StreamEncoderInitStatusString[init_status]); flac_encoder_close(_encoder); return false; diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c index 94816a7ac..5b3110988 100644 --- a/src/encoder/vorbis_encoder.c +++ b/src/encoder/vorbis_encoder.c @@ -276,6 +276,8 @@ vorbis_encoder_flush(struct encoder *_encoder, G_GNUC_UNUSED GError **error) vorbis_analysis_init(&encoder->vd, &encoder->vi); vorbis_block_init(&encoder->vd, &encoder->vb); + ogg_stream_reset(&encoder->os); + encoder->flush = true; return true; } diff --git a/src/encoder/wave_encoder.c b/src/encoder/wave_encoder.c index 7f1d4fcdf..6ebacab7d 100644 --- a/src/encoder/wave_encoder.c +++ b/src/encoder/wave_encoder.c @@ -58,7 +58,7 @@ wave_encoder_quark(void) } static void -fill_wave_header(struct wave_header *header, int channels, int bits, +fill_wave_header(struct wave_header *header, int channels, int bits, int freq, int block_size) { int data_size = 0x0FFFFFFF; @@ -142,7 +142,7 @@ wave_encoder_open(struct encoder *_encoder, buffer = pcm_buffer_get(&encoder->buffer, sizeof(struct wave_header) ); /* create PCM wave header in initial buffer */ - fill_wave_header((struct wave_header *) buffer, + fill_wave_header((struct wave_header *) buffer, audio_format->channels, encoder->bits, audio_format->sample_rate, |