encoders/prores_aw: Update to match new std::shared_ptr<AVFrame> code
This commit is contained in:
@@ -274,7 +274,7 @@ bool obsffmpeg::encoder::prores_aw::encode(encoder_frame* frame, encoder_packet*
|
||||
|
||||
{
|
||||
ScopeProfiler sp_frame("frame");
|
||||
AVFrame* vframe = frame_queue.pop();
|
||||
std::shared_ptr<AVFrame> vframe = frame_queue.pop();
|
||||
vframe->pts = frame->pts;
|
||||
|
||||
vframe->color_range = this->avcontext->color_range;
|
||||
@@ -294,7 +294,7 @@ bool obsffmpeg::encoder::prores_aw::encode(encoder_frame* frame, encoder_packet*
|
||||
|
||||
{
|
||||
ScopeProfiler profile("send");
|
||||
res = avcodec_send_frame(this->avcontext, vframe);
|
||||
res = avcodec_send_frame(this->avcontext, vframe.get());
|
||||
if (res < 0) {
|
||||
PLOG_ERROR(LOG_PREFIX "Failed to encode frame: %s (%ld).",
|
||||
ffmpeg::tools::get_error_description(res), res);
|
||||
@@ -320,12 +320,10 @@ bool obsffmpeg::encoder::prores_aw::encode(encoder_frame* frame, encoder_packet*
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
AVFrame* uframe = frame_queue_used.pop_only();
|
||||
std::shared_ptr<AVFrame> uframe = frame_queue_used.pop_only();
|
||||
if (uframe) {
|
||||
if (frame_queue.empty()) {
|
||||
frame_queue.push(uframe);
|
||||
} else {
|
||||
av_frame_free(&uframe);
|
||||
}
|
||||
}
|
||||
packet->type = OBS_ENCODER_VIDEO;
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#ifndef OBS_FFMPEG_ENCODER_PRORES_AW
|
||||
#define OBS_FFMPEG_ENCODER_PRORES_AW
|
||||
#pragma once
|
||||
|
||||
#include <encoder.hpp>
|
||||
@@ -75,5 +73,3 @@ namespace obsffmpeg {
|
||||
};
|
||||
} // namespace encoder
|
||||
} // namespace obsffmpeg
|
||||
|
||||
#endif OBS_FFMPEG_ENCODER_PRORES_AW
|
||||
|
||||
Reference in New Issue
Block a user