diff options
author | James Almer <jamrial@gmail.com> | 2023-01-23 19:05:02 -0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-02-09 15:24:16 +0100 |
commit | e0786a8eeb9e7c8feb057e83f284491f0a87e463 (patch) | |
tree | cfaa0daf5762ab3ccfb8e6c109e970adb32a9436 /libavcodec/encode.c | |
parent | 2f9cd8861797df5b4d2e36143dfa8268b65cfd38 (diff) | |
download | ffmpeg-e0786a8eeb9e7c8feb057e83f284491f0a87e463.tar.gz |
avcodec: remove FF_API_THREAD_SAFE_CALLBACKS
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r-- | libavcodec/encode.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c index b0a9625ca9..6499d962ca 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -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) |