diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-03-23 13:11:42 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-03-23 13:12:25 +0100 |
commit | 42b5cc8938d04f5baeebb7920e91c7508e1a6fda (patch) | |
tree | 250fedd5a2ba5b8e534c4173b30542844b753a99 /ext/opus/gstopusheader.c | |
parent | 856bb027f993413494ed76ef9f282ead99812075 (diff) | |
download | gstreamer-plugins-bad-42b5cc8938d04f5baeebb7920e91c7508e1a6fda.tar.gz |
opusenc: Remove useless headers and header_sent variables from the instance struct
They are only used inside a single function.
Diffstat (limited to 'ext/opus/gstopusheader.c')
-rw-r--r-- | ext/opus/gstopusheader.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/opus/gstopusheader.c b/ext/opus/gstopusheader.c index 53969602b..6155ac069 100644 --- a/ext/opus/gstopusheader.c +++ b/ext/opus/gstopusheader.c @@ -163,7 +163,7 @@ gst_opus_header_create_caps_from_headers (GstCaps ** caps, GSList ** headers, guint8 *data; g_return_if_fail (caps); - g_return_if_fail (headers && !*headers); + g_return_if_fail (!headers || !*headers); g_return_if_fail (gst_buffer_get_size (buf1) >= 19); gst_buffer_map (buf1, &map, GST_MAP_READ); @@ -199,8 +199,10 @@ gst_opus_header_create_caps_from_headers (GstCaps ** caps, GSList ** headers, "channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, rate, NULL); *caps = _gst_caps_set_buffer_array (*caps, "streamheader", buf1, buf2, NULL); - *headers = g_slist_prepend (*headers, gst_buffer_ref (buf2)); - *headers = g_slist_prepend (*headers, gst_buffer_ref (buf1)); + if (headers) { + *headers = g_slist_prepend (*headers, gst_buffer_ref (buf2)); + *headers = g_slist_prepend (*headers, gst_buffer_ref (buf1)); + } } void @@ -211,7 +213,7 @@ gst_opus_header_create_caps (GstCaps ** caps, GSList ** headers, gint nchannels, GstBuffer *buf1, *buf2; g_return_if_fail (caps); - g_return_if_fail (headers && !*headers); + g_return_if_fail (!headers || !*headers); g_return_if_fail (nchannels > 0); g_return_if_fail (sample_rate >= 0); /* 0 -> unset */ g_return_if_fail (channel_mapping_family == 0 || channel_mapping); |