summaryrefslogtreecommitdiff
path: root/src/encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/encode.c')
-rw-r--r--src/encode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/encode.c b/src/encode.c
index a149219..62f0a71 100644
--- a/src/encode.c
+++ b/src/encode.c
@@ -23,7 +23,8 @@ on_autoplug_continue (GstElement *decodebin,
else
ret = TRUE, g_debug ("encodebin cannot passthrough %s\n", name);
- gst_object_unref (sinkpad);
+ if (sinkpad)
+ gst_object_unref (sinkpad);
g_free (name);
return ret;
}
@@ -65,7 +66,8 @@ on_decodebin_pad_added (GstElement *decodebin,
out:
g_free (name);
gst_caps_unref (caps);
- gst_object_unref (sinkpad);
+ if (sinkpad)
+ gst_object_unref (sinkpad);
return;
}