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
@ -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…
x
Reference in New Issue
Block a user