mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
ges-launch: Don't leak caps
This commit is contained in:
parent
8a7503ce2b
commit
e15f981c5c
1 changed files with 12 additions and 3 deletions
|
@ -160,17 +160,26 @@ make_encoding_profile (gchar * audio, gchar * video, gchar * video_restriction,
|
||||||
{
|
{
|
||||||
GstEncodingProfile *profile;
|
GstEncodingProfile *profile;
|
||||||
GstStreamEncodingProfile *stream;
|
GstStreamEncodingProfile *stream;
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
profile = gst_encoding_profile_new ((gchar *) "ges-test4",
|
caps = gst_caps_from_string (container);
|
||||||
gst_caps_from_string (container), NULL, FALSE);
|
profile = gst_encoding_profile_new ((gchar *) "ges-test4", caps, NULL, FALSE);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
caps = gst_caps_from_string (audio);
|
||||||
stream =
|
stream =
|
||||||
gst_stream_encoding_profile_new (GST_ENCODING_PROFILE_AUDIO,
|
gst_stream_encoding_profile_new (GST_ENCODING_PROFILE_AUDIO,
|
||||||
gst_caps_from_string (audio), NULL, NULL, 0);
|
caps, NULL, NULL, 0);
|
||||||
gst_encoding_profile_add_stream (profile, stream);
|
gst_encoding_profile_add_stream (profile, stream);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
caps = gst_caps_from_string (video);
|
||||||
stream = gst_stream_encoding_profile_new (GST_ENCODING_PROFILE_VIDEO,
|
stream = gst_stream_encoding_profile_new (GST_ENCODING_PROFILE_VIDEO,
|
||||||
gst_caps_from_string (video),
|
gst_caps_from_string (video),
|
||||||
NULL, gst_caps_from_string (video_restriction), 0);
|
NULL, gst_caps_from_string (video_restriction), 0);
|
||||||
gst_encoding_profile_add_stream (profile, stream);
|
gst_encoding_profile_add_stream (profile, stream);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue