encoder/vorbis: generate end-of-stream packet when playback ends
Add the encoder_plugin method end(). This is important for the recorder plugin.
This commit is contained in:
@@ -191,7 +191,7 @@ recorder_output_close(void *data)
|
||||
|
||||
/* flush the encoder and write the rest to the file */
|
||||
|
||||
if (encoder_flush(recorder->encoder, NULL))
|
||||
if (encoder_end(recorder->encoder, NULL))
|
||||
recorder_output_encoder_to_file(recorder, NULL);
|
||||
|
||||
/* now really close everything */
|
||||
|
||||
@@ -358,7 +358,7 @@ static void close_shout_conn(struct shout_data * sd)
|
||||
sd->buf.len = 0;
|
||||
|
||||
if (sd->encoder != NULL) {
|
||||
if (encoder_flush(sd->encoder, NULL))
|
||||
if (encoder_end(sd->encoder, NULL))
|
||||
write_page(sd, NULL);
|
||||
|
||||
encoder_close(sd->encoder);
|
||||
|
||||
Reference in New Issue
Block a user