summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-09-05 13:58:34 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-09-05 13:58:34 +0200
commit2f39555d7bfbf367df75762e0a867c1d654171ea (patch)
treee3d948016154dde48f59471517b45105d750192b
parent490f2a1b93508396f4eba052d57db9ddf57bd3d6 (diff)
Fixed error handling in transcode().
-rw-r--r--transcode.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/transcode.c b/transcode.c
index 6508b28..54418cd 100644
--- a/transcode.c
+++ b/transcode.c
@@ -19,17 +19,11 @@ void transcode(GInputStream *input, const struct decoder_plugin *decoder,
gssize size = g_output_stream_splice(output, encoded_stream,
G_OUTPUT_STREAM_SPLICE_NONE, NULL, &error);
- if(size == -1) {
- if(error) {
- g_warning(error->message);
- g_error_free(error);
- } else {
- g_debug("g_output_stream_splice returned -1, but error is NULL!");
- }
+ if(size == -1 && error != NULL) {
+ g_warning(error->message);
+ g_error_free(error);
}
- g_debug("transcode ended");
-
g_object_unref(encoded_stream);
g_object_unref(ec);