mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
omxh265enc: fix caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=787714
This commit is contained in:
parent
1bc6976b7b
commit
27cd61a21a
1 changed files with 6 additions and 4 deletions
|
@ -447,10 +447,6 @@ gst_omx_h265_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
||||||
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
||||||
const gchar *profile, *level, *tier;
|
const gchar *profile, *level, *tier;
|
||||||
|
|
||||||
caps = gst_caps_new_simple ("video/x-h265",
|
|
||||||
"stream-format", G_TYPE_STRING, "byte-stream",
|
|
||||||
"alignment", G_TYPE_STRING, "au", NULL);
|
|
||||||
|
|
||||||
GST_OMX_INIT_STRUCT (¶m);
|
GST_OMX_INIT_STRUCT (¶m);
|
||||||
param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
|
param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
|
||||||
|
|
||||||
|
@ -460,6 +456,10 @@ gst_omx_h265_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
||||||
if (err != OMX_ErrorNone && err != OMX_ErrorUnsupportedIndex)
|
if (err != OMX_ErrorNone && err != OMX_ErrorUnsupportedIndex)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
caps = gst_caps_new_simple ("video/x-h265",
|
||||||
|
"stream-format", G_TYPE_STRING, "byte-stream",
|
||||||
|
"alignment", G_TYPE_STRING, "au", NULL);
|
||||||
|
|
||||||
if (err == OMX_ErrorNone) {
|
if (err == OMX_ErrorNone) {
|
||||||
switch (param.eProfile) {
|
switch (param.eProfile) {
|
||||||
case OMX_VIDEO_HEVCProfileMain:
|
case OMX_VIDEO_HEVCProfileMain:
|
||||||
|
@ -481,6 +481,7 @@ gst_omx_h265_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
gst_caps_unref (caps);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,6 +572,7 @@ gst_omx_h265_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
gst_caps_unref (caps);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue