mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
vtenc: free input buffer ASAP
VTCompressionSessionEncodeFrame retains the CVPixelBuffer during encoding, and will release it as soon as it can (e.g. before it even calls our callback). This means we can safely release input buffer at this point, possibly allowing the system to reuse it sooner. https://bugzilla.gnome.org/show_bug.cgi?id=750671
This commit is contained in:
parent
f5c29c7379
commit
6101fc57b8
1 changed files with 4 additions and 0 deletions
|
@ -1202,6 +1202,10 @@ gst_vtenc_encode_frame (GstVTEnc * self, GstVideoCodecFrame * frame)
|
|||
(int) vt_status);
|
||||
}
|
||||
|
||||
/* VTCompressionSessionEncodeFrame retained pbuf
|
||||
* and we want to free input_buffer ASAP */
|
||||
gst_buffer_replace (&frame->input_buffer, NULL);
|
||||
|
||||
gst_video_codec_frame_unref (frame);
|
||||
|
||||
CVPixelBufferRelease (pbuf);
|
||||
|
|
Loading…
Reference in a new issue