aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/run_decoder.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/run_decoder.c b/test/run_decoder.c
index efc246f55..455b73ce7 100644
--- a/test/run_decoder.c
+++ b/test/run_decoder.c
@@ -112,7 +112,7 @@ decoder_read(G_GNUC_UNUSED struct decoder *decoder,
struct input_stream *is,
void *buffer, size_t length)
{
- return input_stream_read(is, buffer, length, NULL);
+ return input_stream_lock_read(is, buffer, length, NULL);
}
void
@@ -209,8 +209,11 @@ int main(int argc, char **argv)
decoder_plugin_file_decode(decoder.plugin, &decoder,
decoder.uri);
} else if (decoder.plugin->stream_decode != NULL) {
+ GMutex *mutex = g_mutex_new();
+ GCond *cond = g_cond_new();
+
struct input_stream *is =
- input_stream_open(decoder.uri, &error);
+ input_stream_open(decoder.uri, mutex, cond, &error);
if (is == NULL) {
if (error != NULL) {
g_warning("%s", error->message);
@@ -224,6 +227,9 @@ int main(int argc, char **argv)
decoder_plugin_stream_decode(decoder.plugin, &decoder, is);
input_stream_close(is);
+
+ g_cond_free(cond);
+ g_mutex_free(mutex);
} else {
g_printerr("Decoder plugin is not usable\n");
return 1;