From 228b03edf8513aa1cdaf4e4647279cc580245555 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Nov 2009 23:53:04 +0100 Subject: input_stream: return errors with GError --- src/playlist/asx_playlist_plugin.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/playlist/asx_playlist_plugin.c') diff --git a/src/playlist/asx_playlist_plugin.c b/src/playlist/asx_playlist_plugin.c index 901212f90..03a5edea6 100644 --- a/src/playlist/asx_playlist_plugin.c +++ b/src/playlist/asx_playlist_plugin.c @@ -233,9 +233,17 @@ asx_open_stream(struct input_stream *is) &parser, asx_parser_destroy); while (true) { - nbytes = input_stream_read(is, buffer, sizeof(buffer)); - if (nbytes == 0) + nbytes = input_stream_read(is, buffer, sizeof(buffer), &error); + if (nbytes == 0) { + if (error != NULL) { + g_markup_parse_context_free(context); + g_warning("%s", error->message); + g_error_free(error); + return NULL; + } + break; + } success = g_markup_parse_context_parse(context, buffer, nbytes, &error); -- cgit v1.2.3