summaryrefslogtreecommitdiff
path: root/src/lib.c
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-14 09:51:24 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-14 09:51:24 (GMT)
commit287115c35750cd21a5944890aaf8250af8e2b3ef (patch)
tree8f503cfd24311423540dd7ffe67986b50306f376 /src/lib.c
parent292c41daa52dd4103cc4d1b3d11bda0f90295b9f (diff)
downloadsoup-transcoding-proxy-287115c35750cd21a5944890aaf8250af8e2b3ef.zip
soup-transcoding-proxy-287115c35750cd21a5944890aaf8250af8e2b3ef.tar.gz
appsink: Use the correct API for getting the streamheader
Pointed out in a review by slomo
Diffstat (limited to 'src/lib.c')
-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));