[easytag/wip/ogg-errors] Ignore Ogg EOF errors when fetching packets
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/ogg-errors] Ignore Ogg EOF errors when fetching packets
- Date: Thu, 30 May 2013 22:12:54 +0000 (UTC)
commit a6f301b7a3df396197484287671a64bc6e701965
Author: David King <amigadave amigadave com>
Date: Thu May 30 22:56:52 2013 +0100
Ignore Ogg EOF errors when fetching packets
Although this is nominally an error, it is not a failure if there are no
more packets in the stream.
src/misc.c | 2 +-
src/vcedit.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/misc.c b/src/misc.c
index 4a1860f..df0cdb3 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -3113,7 +3113,7 @@ Load_File_Content (GtkWidget *entry)
gtk_list_store_clear(LoadFileContentListModel);
while ((size_read = g_input_stream_read (G_INPUT_STREAM (istream),
buffer, sizeof(buffer),
- NULL, &error) > 0))
+ NULL, &error)) > 0)
{
if (buffer[strlen(buffer)-1]=='\n')
buffer[strlen(buffer)-1]='\0';
diff --git a/src/vcedit.c b/src/vcedit.c
index d0befe2..cbaa47b 100644
--- a/src/vcedit.c
+++ b/src/vcedit.c
@@ -628,7 +628,16 @@ vcedit_write(vcedit_state *state, GFile *file, GError **error)
if (error == NULL || *error != NULL)
{
- goto cleanup;
+ if (g_error_matches (*error, ET_OGG_ERROR, ET_OGG_ERROR_EOF))
+ {
+ /* While nominally an error, this is expected and can be safely
+ * ignored. */
+ g_clear_error (error);
+ }
+ else
+ {
+ goto cleanup;
+ }
}
streamout.e_o_s = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]