encoder_plugin: add method pre_tag()

In the "vorbis" plugin, this is a copy of the old flush() method,
while flush() gets a lot of code remove, it just sets the "flush" flag
and nothing else.  It doesn't start a new stream now, which should fix
a few problems in some players.
This commit is contained in:
Max Kellermann
2011-07-20 20:54:34 +02:00
parent 13539961b2
commit 838f7cd210
5 changed files with 39 additions and 2 deletions
+1 -1
View File
@@ -523,7 +523,7 @@ httpd_output_tag(void *data, const struct tag *tag)
/* flush the current stream, and end it */
encoder_flush(httpd->encoder, NULL);
encoder_pre_tag(httpd->encoder, NULL);
httpd_output_encoder_to_clients(httpd);
/* send the tag to the encoder - which starts a new
+1 -1
View File
@@ -511,7 +511,7 @@ static void my_shout_set_tag(void *data,
if (sd->encoder->plugin->tag != NULL) {
/* encoder plugin supports stream tags */
ret = encoder_flush(sd->encoder, &error);
ret = encoder_pre_tag(sd->encoder, &error);
if (!ret) {
g_warning("%s", error->message);
g_error_free(error);