diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-01-09 20:01:02 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-04-10 15:16:39 +0300 |
commit | 665e5b0fba41a8bae2269d9ce8929a24002e5907 (patch) | |
tree | 397136c747d006cdb54f4ff126cdca94f0297f77 /libavcodec/pngdec.c | |
parent | 7385ffbd31a47a5dd5e66b9d3ba48a4474bbd180 (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/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 3ce980fc15..af8608b23b 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1772,7 +1772,6 @@ static av_cold int png_dec_init(AVCodecContext *avctx) } if (!avctx->internal->is_copy) { - avctx->internal->allocate_progress = 1; ff_pngdsp_init(&s->dsp); } @@ -1812,7 +1811,8 @@ AVCodec ff_apng_decoder = { .init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init), .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, - .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_ALLOCATE_PROGRESS, }; #endif @@ -1829,7 +1829,8 @@ AVCodec ff_png_decoder = { .init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init), .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_ALLOCATE_PROGRESS, }; #endif @@ -1845,6 +1846,7 @@ AVCodec ff_lscr_decoder = { .decode = decode_frame_lscr, .flush = decode_flush, .capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_ALLOCATE_PROGRESS, }; #endif |