mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 06:05:32 +01:00
avcodec/frame_thread_encoder: Stop serializing unreferencing AVFrames
Currently, the frame-threaded decoding API still supports thread-unsafe callbacks. If one uses a thread-unsafe get_buffer2() callback, calls to av_frame_unref() by the decoder are serialized, because it is presumed that the underlying deallocator is thread-unsafe. The frame-threaded encoder seems to have been written with this restriction in mind: It always serializes unreferencing its AVFrames, although no documentation forces it to do so. This commit schedules to change this behaviour as soon as thread-unsafe callbacks are removed. For this reason, the FF_API_THREAD_SAFE_CALLBACKS define is reused. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -76,7 +76,7 @@ int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size);
|
||||
int ff_encode_preinit(AVCodecContext *avctx);
|
||||
|
||||
int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
const AVFrame *frame, int *got_packet);
|
||||
AVFrame *frame, int *got_packet);
|
||||
|
||||
/**
|
||||
* Rescale from sample rate to AVCodecContext.time_base.
|
||||
|
||||
Reference in New Issue
Block a user