diff options
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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)); |