diff options
author | Edward Hervey <edward@centricular.com> | 2022-11-12 11:16:36 +0300 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2022-11-13 08:59:11 +0300 |
commit | 1c8a57a85c54a95b1b712d8972e39378b6d70fb9 (patch) | |
tree | ec2d382708c1bdf61a82406f011d13cdc43ce6af | |
parent | 2e2bc0da54413da4ee64d481b146dde3c9e0838a (diff) |
transcodebin: Use const arguments for clarity
And rename it when it classhes with existing local variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>
-rw-r--r-- | subprojects/gst-plugins-bad/gst/transcode/gsttranscodebin.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/subprojects/gst-plugins-bad/gst/transcode/gsttranscodebin.c b/subprojects/gst-plugins-bad/gst/transcode/gsttranscodebin.c index 9374a673ca..aab0bbd9a3 100644 --- a/subprojects/gst-plugins-bad/gst/transcode/gsttranscodebin.c +++ b/subprojects/gst-plugins-bad/gst/transcode/gsttranscodebin.c @@ -177,15 +177,16 @@ filter_handles_any (GstElement * filter) static GstPad * _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad, - GstCaps * caps) + const GstCaps * filtercaps) { GstPad *filter_src = NULL, *filter_sink = NULL, *convert_sink, *convert_src; GstElement *filter = NULL, *convert; GstObject *filter_parent; const gchar *media_type; gboolean audio = TRUE; + GstCaps *caps; - media_type = gst_structure_get_name (gst_caps_get_structure (caps, 0)); + media_type = gst_structure_get_name (gst_caps_get_structure (filtercaps, 0)); if (self->video_filter && g_str_has_prefix (media_type, "video")) { audio = FALSE; @@ -195,7 +196,7 @@ _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad, filter = self->video_filter; else GST_ERROR_OBJECT (pad, "decodebin pad does not produce raw data (%" - GST_PTR_FORMAT "), cannot add video filter '%s'", caps, + GST_PTR_FORMAT "), cannot add video filter '%s'", filtercaps, GST_ELEMENT_NAME (self->video_filter)); } else if (self->audio_filter && g_str_has_prefix (media_type, "audio")) { if (!g_strcmp0 (media_type, "audio/x-raw") @@ -203,7 +204,7 @@ _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad, filter = self->audio_filter; else GST_ERROR_OBJECT (pad, "decodebin pad does not produce raw data (%" - GST_PTR_FORMAT "), cannot add audio filter '%s'", caps, + GST_PTR_FORMAT "), cannot add audio filter '%s'", filtercaps, GST_ELEMENT_NAME (self->audio_filter)); } @@ -512,7 +513,7 @@ no_profile: } static GstPad * -get_encodebin_pad_for_caps (GstTranscodeBin * self, GstCaps * srccaps) +get_encodebin_pad_for_caps (GstTranscodeBin * self, const GstCaps * srccaps) { GstPad *res = NULL; GstIterator *pads; |