summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib.c b/src/lib.c
index f252d1f..115249a 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -153,16 +153,14 @@ stp_disconnect_cleanup_client (TranscodeClientCtx *ctx)
GstBuffer*
stp_get_streamheader_from_caps (GstCaps *caps)
{
- GArray *array;
GstStructure *s;
- const GValue *value;
+ const GValue *array, *value;
s = gst_caps_get_structure (caps, 0);
- value = gst_structure_get_value (s, "streamheader");
- g_return_val_if_fail (G_IS_VALUE (value), NULL);
+ array = gst_structure_get_value (s, "streamheader");
+ g_return_val_if_fail (GST_VALUE_HOLDS_ARRAY (array), NULL);
- array = g_value_peek_pointer (value);
- value = &g_array_index (array, GValue, 0);
+ value = gst_value_array_get_value (array, 0);
g_return_val_if_fail (G_VALUE_TYPE (value) == GST_TYPE_BUFFER, NULL);
return gst_buffer_copy (g_value_peek_pointer (value));