mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
omxh264enc: fix caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=787711
This commit is contained in:
parent
27cd61a21a
commit
1f36637434
1 changed files with 6 additions and 4 deletions
|
@ -605,10 +605,6 @@ gst_omx_h264_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
||||
const gchar *profile, *level;
|
||||
|
||||
caps = gst_caps_new_simple ("video/x-h264",
|
||||
"stream-format", G_TYPE_STRING, "byte-stream",
|
||||
"alignment", G_TYPE_STRING, "au", NULL);
|
||||
|
||||
GST_OMX_INIT_STRUCT (¶m);
|
||||
param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
|
||||
|
||||
|
@ -618,6 +614,10 @@ gst_omx_h264_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
if (err != OMX_ErrorNone && err != OMX_ErrorUnsupportedIndex)
|
||||
return NULL;
|
||||
|
||||
caps = gst_caps_new_simple ("video/x-h264",
|
||||
"stream-format", G_TYPE_STRING, "byte-stream",
|
||||
"alignment", G_TYPE_STRING, "au", NULL);
|
||||
|
||||
if (err == OMX_ErrorNone) {
|
||||
switch (param.eProfile) {
|
||||
case OMX_VIDEO_AVCProfileBaseline:
|
||||
|
@ -643,6 +643,7 @@ gst_omx_h264_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
gst_caps_unref (caps);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -697,6 +698,7 @@ gst_omx_h264_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
|||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
gst_caps_unref (caps);
|
||||
return NULL;
|
||||
}
|
||||
gst_caps_set_simple (caps,
|
||||
|
|
Loading…
Reference in a new issue