summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/encode.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/encode.c b/src/encode.c
index 1eb77d9..fa2001c 100644
--- a/src/encode.c
+++ b/src/encode.c
@@ -119,6 +119,9 @@ create_webm_profile (void)
void
stp_encode_from_msg (TranscodeServerCtx *ctx)
{
+#ifdef ENCODE_DEBUG
+ char *tmp, *filename;
+#endif
GstBus *bus;
GstElement *src, *decodebin, *encodebin;
GstElement *tee, *q1, *fakesink;
@@ -148,7 +151,11 @@ stp_encode_from_msg (TranscodeServerCtx *ctx)
q1 = gst_element_factory_make ("queue", "q1");
#ifdef ENCODE_DEBUG
fakesink = gst_element_factory_make ("filesink", "filesink");
- g_object_set (fakesink, "location", "debug-encode.webm", NULL);
+ tmp = g_uri_escape_string (ctx->path, NULL, TRUE);
+ filename = g_strdup_printf ("debug-encode-%s.webm", tmp);
+ g_object_set (fakesink, "location", filename, NULL);
+ g_free (filename);
+ g_free (tmp);
#else
fakesink = gst_element_factory_make ("fakesink", "fakesink");
#endif