diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-29 15:03:21 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-03 15:42:57 +0200 |
commit | 73fada029c527fda6c248785a948c61249fd4b2d (patch) | |
tree | f8c785ff529107f76d5b4b3f3647a3ec6bb1bef6 /libavcodec/pngdec.c | |
parent | 48286d4d98e6417dff397d6f15e6b2ca3310f0ca (diff) | |
download | ffmpeg-73fada029c527fda6c248785a948c61249fd4b2d.tar.gz |
avcodec/codec_internal: Add macros for update_thread_context(_for_user)
It reduces typing: Before this patch, there were 11 callbacks
that exceeded the 80 char line length limit; now there are zero.
It also allows to remove ONLY_IF_THREADS_ENABLED() in
libavutil/internal.h.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 9e7d9b589f..582953d17b 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1722,7 +1722,7 @@ const FFCodec ff_apng_decoder = { .init = png_dec_init, .close = png_dec_end, FF_CODEC_DECODE_CB(decode_frame_apng), - .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), + UPDATE_THREAD_CONTEXT(update_thread_context), .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_ALLOCATE_PROGRESS | @@ -1740,7 +1740,7 @@ const FFCodec ff_png_decoder = { .init = png_dec_init, .close = png_dec_end, FF_CODEC_DECODE_CB(decode_frame_png), - .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), + UPDATE_THREAD_CONTEXT(update_thread_context), .p.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_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP | |