summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);