avcodec: remove FF_API_THREAD_SAFE_CALLBACKS

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
James Almer
2023-01-23 19:05:02 -03:00
committed by Anton Khirnov
parent 2f9cd88617
commit e0786a8eeb
9 changed files with 6 additions and 315 deletions
+1 -6
View File
@@ -259,10 +259,9 @@ int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt,
unref:
av_packet_unref(avpkt);
}
#if !FF_API_THREAD_SAFE_CALLBACKS
if (frame)
av_frame_unref(frame);
#endif
return ret;
}
@@ -303,10 +302,6 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt)
ret = ff_thread_video_encode_frame(avctx, avpkt, frame, &got_packet);
else {
ret = ff_encode_encode_cb(avctx, avpkt, frame, &got_packet);
#if FF_API_THREAD_SAFE_CALLBACKS
if (frame)
av_frame_unref(frame);
#endif
}
if (avci->draining && !got_packet)