diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-14 09:51:24 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-14 09:51:24 (GMT) |
commit | 287115c35750cd21a5944890aaf8250af8e2b3ef (patch) | |
tree | 8f503cfd24311423540dd7ffe67986b50306f376 /src/lib.c | |
parent | 292c41daa52dd4103cc4d1b3d11bda0f90295b9f (diff) | |
download | soup-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.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)); |