summaryrefslogtreecommitdiff
path: root/libavcodec/pthread_frame.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-01-09 18:01:02 +0100
committerAnton Khirnov <anton@khirnov.net>2020-04-10 14:16:39 +0200
commit665e5b0fba41a8bae2269d9ce8929a24002e5907 (patch)
tree397136c747d006cdb54f4ff126cdca94f0297f77 /libavcodec/pthread_frame.c
parent7385ffbd31a47a5dd5e66b9d3ba48a4474bbd180 (diff)
lavc: replace AVCodecInternal.allocate_progress with an internal cap
This is a constant codec property, so a capability flag is more appropriate.
Diffstat (limited to 'libavcodec/pthread_frame.c')
-rw-r--r--libavcodec/pthread_frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 0e51e89653..f078790737 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -201,7 +201,7 @@ static attribute_align_arg void *frame_worker_thread(void *arg)
p->result = codec->decode(avctx, p->frame, &p->got_frame, &p->avpkt);
if ((p->result < 0 || !p->got_frame) && p->frame->buf[0]) {
- if (avctx->internal->allocate_progress)
+ if (avctx->codec->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS)
av_log(avctx, AV_LOG_ERROR, "A frame threaded decoder did not "
"free the frame on failure. This is a bug, please report it.\n");
av_frame_unref(p->frame);
@@ -903,7 +903,7 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int
return -1;
}
- if (avctx->internal->allocate_progress) {
+ if (avctx->codec->caps_internal & FF_CODEC_CAP_ALLOCATE_PROGRESS) {
atomic_int *progress;
f->progress = av_buffer_alloc(2 * sizeof(*progress));
if (!f->progress) {