mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
openh264enc: fix caps and header buffer leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2178>
This commit is contained in:
parent
42a7edd40f
commit
90c1732849
1 changed files with 3 additions and 1 deletions
|
@ -811,6 +811,8 @@ gst_openh264enc_set_format (GstVideoEncoder * encoder,
|
|||
enc_params.sSpatialLayers[0].iSpatialBitrate = enc_params.iTargetBitrate;
|
||||
enc_params.sSpatialLayers[0].iMaxSpatialBitrate = enc_params.iMaxBitrate;
|
||||
|
||||
gst_clear_caps (&allowed_caps);
|
||||
|
||||
if (openh264enc->slice_mode == GST_OPENH264_SLICE_MODE_N_SLICES) {
|
||||
if (openh264enc->num_slices == 1)
|
||||
slice_mode = SM_SINGLE_SLICE;
|
||||
|
@ -1050,7 +1052,7 @@ gst_openh264enc_handle_frame (GstVideoEncoder * encoder,
|
|||
frame_info.sLayerInfo[i].pNalLengthInByte[j]);
|
||||
}
|
||||
}
|
||||
headers = g_list_append (headers, gst_buffer_ref (hdr));
|
||||
headers = g_list_append (headers, hdr); /* take ownership of hdr */
|
||||
}
|
||||
gst_buffer_fill (frame->output_buffer, buf_length, frame_info.sLayerInfo[i].pBsBuf, layer_size);
|
||||
buf_length += layer_size;
|
||||
|
|
Loading…
Reference in a new issue