Fix CVPixelBuffer/CMSampleBuffer ownership issues
This commit is contained in:
@@ -5,8 +5,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "src/platform/common.h"
|
||||
#include "src/platform/macos/av_img_t.h"
|
||||
|
||||
struct AVFrame;
|
||||
|
||||
namespace platf {
|
||||
void
|
||||
free_frame(AVFrame *frame);
|
||||
|
||||
class nv12_zero_device: public avcodec_encode_device_t {
|
||||
// display holds a pointer to an av_video object. Since the namespaces of AVFoundation
|
||||
@@ -27,6 +32,10 @@ namespace platf {
|
||||
convert(img_t &img);
|
||||
int
|
||||
set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx);
|
||||
|
||||
private:
|
||||
util::safe_ptr<AVFrame, free_frame> av_frame;
|
||||
av_img_t backing_img;
|
||||
};
|
||||
|
||||
} // namespace platf
|
||||
|
||||
Reference in New Issue
Block a user