mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-20 19:10:18 +00:00
x264enc: No need to copy, reffing is enough
This commit is contained in:
parent
cd5fc6ed8d
commit
0d362e5572
1 changed files with 2 additions and 2 deletions
|
@ -1466,7 +1466,7 @@ gst_x264_enc_sink_get_caps (GstPad * pad)
|
||||||
|
|
||||||
/* If we already have caps return them */
|
/* If we already have caps return them */
|
||||||
if (GST_PAD_CAPS (pad))
|
if (GST_PAD_CAPS (pad))
|
||||||
return gst_caps_copy (GST_PAD_CAPS (pad));
|
return gst_caps_ref (GST_PAD_CAPS (pad));
|
||||||
|
|
||||||
encoder = GST_X264_ENC (gst_pad_get_parent (pad));
|
encoder = GST_X264_ENC (gst_pad_get_parent (pad));
|
||||||
if (!encoder)
|
if (!encoder)
|
||||||
|
@ -1496,7 +1496,7 @@ gst_x264_enc_sink_get_caps (GstPad * pad)
|
||||||
caps = gst_caps_intersect (peercaps, templcaps);
|
caps = gst_caps_intersect (peercaps, templcaps);
|
||||||
gst_caps_unref (peercaps);
|
gst_caps_unref (peercaps);
|
||||||
} else {
|
} else {
|
||||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
caps = gst_caps_ref (gst_pad_get_pad_template_caps (pad));
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_object_unref (encoder);
|
gst_object_unref (encoder);
|
||||||
|
|
Loading…
Reference in a new issue