avcodec: Make init-threadsafety the default

and remove FF_CODEC_CAP_INIT_THREADSAFE
All our native codecs are already init-threadsafe
(only wrappers for external libraries and hwaccels
are typically not marked as init-threadsafe yet),
so it is only natural for this to also be the default state.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent 6aad1204cc
commit 21b23ceab3
  1. 1
      libavcodec/012v.c
  2. 2
      libavcodec/4xm.c
  3. 1
      libavcodec/8bps.c
  4. 2
      libavcodec/8svx.c
  5. 4
      libavcodec/a64multienc.c
  6. 4
      libavcodec/aacdec.c
  7. 2
      libavcodec/aacdec_fixed.c
  8. 2
      libavcodec/aacenc.c
  9. 1
      libavcodec/aasc.c
  10. 2
      libavcodec/ac3dec_fixed.c
  11. 4
      libavcodec/ac3dec_float.c
  12. 2
      libavcodec/ac3enc_fixed.c
  13. 2
      libavcodec/ac3enc_float.c
  14. 1
      libavcodec/adpcm.c
  15. 2
      libavcodec/adpcmenc.c
  16. 1
      libavcodec/adxdec.c
  17. 1
      libavcodec/adxenc.c
  18. 3
      libavcodec/agm.c
  19. 1
      libavcodec/aic.c
  20. 2
      libavcodec/alac.c
  21. 1
      libavcodec/alacenc.c
  22. 2
      libavcodec/alsdec.c
  23. 1
      libavcodec/amrnbdec.c
  24. 1
      libavcodec/amrwbdec.c
  25. 1
      libavcodec/anm.c
  26. 1
      libavcodec/ansi.c
  27. 2
      libavcodec/apedec.c
  28. 2
      libavcodec/aptxdec.c
  29. 2
      libavcodec/aptxenc.c
  30. 2
      libavcodec/arbc.c
  31. 2
      libavcodec/argo.c
  32. 2
      libavcodec/assdec.c
  33. 2
      libavcodec/assenc.c
  34. 2
      libavcodec/asvdec.c
  35. 2
      libavcodec/asvenc.c
  36. 2
      libavcodec/atrac1.c
  37. 4
      libavcodec/atrac3.c
  38. 4
      libavcodec/atrac3plusdec.c
  39. 2
      libavcodec/atrac9dec.c
  40. 2
      libavcodec/audiotoolboxdec.c
  41. 1
      libavcodec/audiotoolboxenc.c
  42. 1
      libavcodec/aura.c
  43. 3
      libavcodec/av1dec.c
  44. 4
      libavcodec/avcodec.c
  45. 2
      libavcodec/avrndec.c
  46. 1
      libavcodec/avs.c
  47. 1
      libavcodec/avuidec.c
  48. 1
      libavcodec/avuienc.c
  49. 1
      libavcodec/bethsoftvideo.c
  50. 1
      libavcodec/bfi.c
  51. 2
      libavcodec/bink.c
  52. 4
      libavcodec/binkaudio.c
  53. 3
      libavcodec/bintext.c
  54. 1
      libavcodec/bitpacked_dec.c
  55. 1
      libavcodec/bitpacked_enc.c
  56. 1
      libavcodec/bmpenc.c
  57. 1
      libavcodec/bmvaudio.c
  58. 1
      libavcodec/bmvvideo.c
  59. 2
      libavcodec/c93.c
  60. 2
      libavcodec/cavsdec.c
  61. 1
      libavcodec/ccaption_dec.c
  62. 1
      libavcodec/cdgraphics.c
  63. 1
      libavcodec/cdtoons.c
  64. 1
      libavcodec/cdxl.c
  65. 2
      libavcodec/cfhd.c
  66. 2
      libavcodec/cfhdenc.c
  67. 1
      libavcodec/cinepak.c
  68. 2
      libavcodec/cinepakenc.c
  69. 2
      libavcodec/clearvideo.c
  70. 1
      libavcodec/cljrdec.c
  71. 1
      libavcodec/cllc.c
  72. 3
      libavcodec/cngdec.c
  73. 2
      libavcodec/cngenc.c
  74. 7
      libavcodec/codec_internal.h
  75. 2
      libavcodec/cook.c
  76. 1
      libavcodec/cpia.c
  77. 2
      libavcodec/cri.c
  78. 2
      libavcodec/cscd.c
  79. 2
      libavcodec/cyuv.c
  80. 2
      libavcodec/dcadec.c
  81. 2
      libavcodec/dcaenc.c
  82. 1
      libavcodec/dds.c
  83. 1
      libavcodec/dfa.c
  84. 1
      libavcodec/dfpwmdec.c
  85. 1
      libavcodec/dfpwmenc.c
  86. 1
      libavcodec/diracdec.c
  87. 1
      libavcodec/dnxhddec.c
  88. 2
      libavcodec/dnxhdenc.c
  89. 2
      libavcodec/dolby_e.c
  90. 1
      libavcodec/dpcm.c
  91. 1
      libavcodec/dpxenc.c
  92. 1
      libavcodec/dsddec.c
  93. 1
      libavcodec/dsicinaudio.c
  94. 2
      libavcodec/dsicinvideo.c
  95. 1
      libavcodec/dss_sp.c
  96. 1
      libavcodec/dstdec.c
  97. 1
      libavcodec/dvaudiodec.c
  98. 1
      libavcodec/dvbsubdec.c
  99. 1
      libavcodec/dvdec.c
  100. 1
      libavcodec/dvdsubdec.c
  101. Some files were not shown because too many files have changed in this diff Show More

@ -152,5 +152,4 @@ const FFCodec ff_zero12v_decoder = {
.init = zero12v_decode_init, .init = zero12v_decode_init,
FF_CODEC_DECODE_CB(zero12v_decode_frame), FF_CODEC_DECODE_CB(zero12v_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1036,5 +1036,5 @@ const FFCodec ff_fourxm_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -182,5 +182,4 @@ const FFCodec ff_eightbps_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -199,7 +199,6 @@ const FFCodec ff_eightsvx_fib_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
#if CONFIG_EIGHTSVX_EXP_DECODER #if CONFIG_EIGHTSVX_EXP_DECODER
@ -215,6 +214,5 @@ const FFCodec ff_eightsvx_exp_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -404,7 +404,7 @@ const FFCodec ff_a64multi_encoder = {
FF_CODEC_ENCODE_CB(a64multi_encode_frame), FF_CODEC_ENCODE_CB(a64multi_encode_frame),
.close = a64multi_close_encoder, .close = a64multi_close_encoder,
.p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}, .p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
#endif #endif
#if CONFIG_A64MULTI5_ENCODER #if CONFIG_A64MULTI5_ENCODER
@ -419,6 +419,6 @@ const FFCodec ff_a64multi5_encoder = {
FF_CODEC_ENCODE_CB(a64multi_encode_frame), FF_CODEC_ENCODE_CB(a64multi_encode_frame),
.close = a64multi_close_encoder, .close = a64multi_close_encoder,
.p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}, .p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
#endif #endif

@ -565,7 +565,7 @@ const FFCodec ff_aac_decoder = {
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
}, },
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = aac_channel_layout, .p.channel_layouts = aac_channel_layout,
#endif #endif
@ -593,7 +593,7 @@ const FFCodec ff_aac_latm_decoder = {
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
}, },
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = aac_channel_layout, .p.channel_layouts = aac_channel_layout,
#endif #endif

@ -463,7 +463,7 @@ const FFCodec ff_aac_fixed_decoder = {
AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_NONE AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_NONE
}, },
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = aac_channel_layout, .p.channel_layouts = aac_channel_layout,
#endif #endif

@ -1150,7 +1150,7 @@ const FFCodec ff_aac_encoder = {
.close = aac_encode_end, .close = aac_encode_end,
.defaults = aac_encode_defaults, .defaults = aac_encode_defaults,
.p.supported_samplerates = ff_mpeg4audio_sample_rates, .p.supported_samplerates = ff_mpeg4audio_sample_rates,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY, .p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },

@ -159,5 +159,4 @@ const FFCodec ff_aasc_decoder = {
.close = aasc_decode_end, .close = aasc_decode_end,
FF_CODEC_DECODE_CB(aasc_decode_frame), FF_CODEC_DECODE_CB(aasc_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -183,5 +183,5 @@ const FFCodec ff_ac3_fixed_decoder = {
AV_CODEC_CAP_DR1, AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -73,7 +73,7 @@ const FFCodec ff_ac3_decoder = {
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.p.priv_class = &ac3_eac3_decoder_class, .p.priv_class = &ac3_eac3_decoder_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
#if CONFIG_EAC3_DECODER #if CONFIG_EAC3_DECODER
@ -91,6 +91,6 @@ const FFCodec ff_eac3_decoder = {
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.p.priv_class = &ac3_eac3_decoder_class, .p.priv_class = &ac3_eac3_decoder_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
#endif #endif

@ -133,7 +133,7 @@ const FFCodec ff_ac3_fixed_encoder = {
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.p.priv_class = &ff_ac3enc_class, .p.priv_class = &ff_ac3enc_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.supported_samplerates = ff_ac3_sample_rate_tab, .p.supported_samplerates = ff_ac3_sample_rate_tab,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = ff_ac3_channel_layouts, .p.channel_layouts = ff_ac3_channel_layouts,

@ -143,6 +143,6 @@ const FFCodec ff_ac3_encoder = {
#endif #endif
.p.ch_layouts = ff_ac3_ch_layouts, .p.ch_layouts = ff_ac3_ch_layouts,
.defaults = ff_ac3_enc_defaults, .defaults = ff_ac3_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
FF_ENABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS

@ -2296,7 +2296,6 @@ const FFCodec ff_ ## name_ ## _decoder = { \
.init = adpcm_decode_init, \ .init = adpcm_decode_init, \
FF_CODEC_DECODE_CB(adpcm_decode_frame), \ FF_CODEC_DECODE_CB(adpcm_decode_frame), \
.flush = adpcm_flush, \ .flush = adpcm_flush, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
}; };
#define ADPCM_DECODER_2(enabled, codec_id, name, sample_fmts, long_name) \ #define ADPCM_DECODER_2(enabled, codec_id, name, sample_fmts, long_name) \
ADPCM_DECODER_ ## enabled(codec_id, name, sample_fmts, long_name) ADPCM_DECODER_ ## enabled(codec_id, name, sample_fmts, long_name)

@ -1009,7 +1009,7 @@ const FFCodec ff_ ## name_ ## _encoder = { \
.init = adpcm_encode_init, \ .init = adpcm_encode_init, \
FF_CODEC_ENCODE_CB(adpcm_encode_frame), \ FF_CODEC_ENCODE_CB(adpcm_encode_frame), \
.close = adpcm_encode_close, \ .close = adpcm_encode_close, \
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, \
}; };
#define ADPCM_ENCODER_2(enabled, codec_id, name, sample_fmts, capabilities, long_name) \ #define ADPCM_ENCODER_2(enabled, codec_id, name, sample_fmts, capabilities, long_name) \
ADPCM_ENCODER_ ## enabled(codec_id, name, sample_fmts, capabilities, long_name) ADPCM_ENCODER_ ## enabled(codec_id, name, sample_fmts, capabilities, long_name)

@ -203,5 +203,4 @@ const FFCodec ff_adpcm_adx_decoder = {
AV_CODEC_CAP_DR1, AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -200,5 +200,4 @@ const FFCodec ff_adpcm_adx_encoder = {
FF_CODEC_ENCODE_CB(adx_encode_frame), FF_CODEC_ENCODE_CB(adx_encode_frame),
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1296,7 +1296,6 @@ const FFCodec ff_agm_decoder = {
.close = decode_close, .close = decode_close,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.flush = decode_flush, .flush = decode_flush,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_CLEANUP |
FF_CODEC_CAP_INIT_CLEANUP |
FF_CODEC_CAP_EXPORTS_CROPPING, FF_CODEC_CAP_EXPORTS_CROPPING,
}; };

@ -505,5 +505,4 @@ const FFCodec ff_aic_decoder = {
.close = aic_decode_close, .close = aic_decode_close,
FF_CODEC_DECODE_CB(aic_decode_frame), FF_CODEC_DECODE_CB(aic_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -620,6 +620,6 @@ const FFCodec ff_alac_decoder = {
.close = alac_decode_close, .close = alac_decode_close,
FF_CODEC_DECODE_CB(alac_decode_frame), FF_CODEC_DECODE_CB(alac_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.priv_class = &alac_class .p.priv_class = &alac_class
}; };

@ -667,6 +667,5 @@ const FFCodec ff_alac_encoder = {
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
FF_ENABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS

@ -2189,5 +2189,5 @@ const FFCodec ff_als_decoder = {
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.flush = flush, .flush = flush,
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -1107,5 +1107,4 @@ const FFCodec ff_amrnb_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1303,5 +1303,4 @@ const FFCodec ff_amrwb_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -199,5 +199,4 @@ const FFCodec ff_anm_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -490,6 +490,5 @@ const FFCodec ff_ansi_decoder = {
.close = decode_close, .close = decode_close,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
.defaults = ansi_defaults, .defaults = ansi_defaults,
}; };

@ -1669,7 +1669,7 @@ const FFCodec ff_ape_decoder = {
FF_CODEC_DECODE_CB(ape_decode_frame), FF_CODEC_DECODE_CB(ape_decode_frame),
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_DR1, AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.flush = ape_flush, .flush = ape_flush,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16P,

@ -183,7 +183,6 @@ const FFCodec ff_aptx_decoder = {
.init = ff_aptx_init, .init = ff_aptx_init,
FF_CODEC_DECODE_CB(aptx_decode_frame), FF_CODEC_DECODE_CB(aptx_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0}, .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif #endif
@ -203,7 +202,6 @@ const FFCodec ff_aptx_hd_decoder = {
.init = ff_aptx_init, .init = ff_aptx_init,
FF_CODEC_DECODE_CB(aptx_decode_frame), FF_CODEC_DECODE_CB(aptx_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0}, .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif #endif

@ -255,7 +255,6 @@ const FFCodec ff_aptx_encoder = {
.init = ff_aptx_init, .init = ff_aptx_init,
FF_CODEC_ENCODE_CB(aptx_encode_frame), FF_CODEC_ENCODE_CB(aptx_encode_frame),
.close = aptx_close, .close = aptx_close,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0}, .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif #endif
@ -277,7 +276,6 @@ const FFCodec ff_aptx_hd_encoder = {
.init = ff_aptx_init, .init = ff_aptx_init,
FF_CODEC_ENCODE_CB(aptx_encode_frame), FF_CODEC_ENCODE_CB(aptx_encode_frame),
.close = aptx_close, .close = aptx_close,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
#if FF_API_OLD_CHANNEL_LAYOUT #if FF_API_OLD_CHANNEL_LAYOUT
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0}, .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
#endif #endif

@ -222,5 +222,5 @@ const FFCodec ff_arbc_decoder = {
.flush = decode_flush, .flush = decode_flush,
.close = decode_close, .close = decode_close,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -744,5 +744,5 @@ const FFCodec ff_argo_decoder = {
.flush = decode_flush, .flush = decode_flush,
.close = decode_close, .close = decode_close,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -69,7 +69,6 @@ const FFCodec ff_ssa_decoder = {
.p.id = AV_CODEC_ID_ASS, .p.id = AV_CODEC_ID_ASS,
.init = ass_decode_init, .init = ass_decode_init,
FF_CODEC_DECODE_SUB_CB(ass_decode_frame), FF_CODEC_DECODE_SUB_CB(ass_decode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
@ -81,6 +80,5 @@ const FFCodec ff_ass_decoder = {
.p.id = AV_CODEC_ID_ASS, .p.id = AV_CODEC_ID_ASS,
.init = ass_decode_init, .init = ass_decode_init,
FF_CODEC_DECODE_SUB_CB(ass_decode_frame), FF_CODEC_DECODE_SUB_CB(ass_decode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -76,7 +76,6 @@ const FFCodec ff_ssa_encoder = {
.p.id = AV_CODEC_ID_ASS, .p.id = AV_CODEC_ID_ASS,
.init = ass_encode_init, .init = ass_encode_init,
FF_CODEC_ENCODE_SUB_CB(ass_encode_frame), FF_CODEC_ENCODE_SUB_CB(ass_encode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
@ -88,6 +87,5 @@ const FFCodec ff_ass_encoder = {
.p.id = AV_CODEC_ID_ASS, .p.id = AV_CODEC_ID_ASS,
.init = ass_encode_init, .init = ass_encode_init,
FF_CODEC_ENCODE_SUB_CB(ass_encode_frame), FF_CODEC_ENCODE_SUB_CB(ass_encode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -338,7 +338,6 @@ const FFCodec ff_asv1_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
@ -352,6 +351,5 @@ const FFCodec ff_asv2_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -353,7 +353,6 @@ const FFCodec ff_asv1_encoder = {
FF_CODEC_ENCODE_CB(encode_frame), FF_CODEC_ENCODE_CB(encode_frame),
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
@ -368,6 +367,5 @@ const FFCodec ff_asv2_encoder = {
FF_CODEC_ENCODE_CB(encode_frame), FF_CODEC_ENCODE_CB(encode_frame),
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -396,5 +396,5 @@ const FFCodec ff_atrac1_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -1027,7 +1027,7 @@ const FFCodec ff_atrac3_decoder = {
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
const FFCodec ff_atrac3al_decoder = { const FFCodec ff_atrac3al_decoder = {
@ -1042,5 +1042,5 @@ const FFCodec ff_atrac3al_decoder = {
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -396,7 +396,7 @@ const FFCodec ff_atrac3p_decoder = {
.p.type = AVMEDIA_TYPE_AUDIO, .p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_ATRAC3P, .p.id = AV_CODEC_ID_ATRAC3P,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_data_size = sizeof(ATRAC3PContext), .priv_data_size = sizeof(ATRAC3PContext),
.init = atrac3p_decode_init, .init = atrac3p_decode_init,
.close = atrac3p_decode_close, .close = atrac3p_decode_close,
@ -409,7 +409,7 @@ const FFCodec ff_atrac3pal_decoder = {
.p.type = AVMEDIA_TYPE_AUDIO, .p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_ATRAC3PAL, .p.id = AV_CODEC_ID_ATRAC3PAL,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_data_size = sizeof(ATRAC3PContext), .priv_data_size = sizeof(ATRAC3PContext),
.init = atrac3p_decode_init, .init = atrac3p_decode_init,
.close = atrac3p_decode_close, .close = atrac3p_decode_close,

@ -997,6 +997,6 @@ const FFCodec ff_atrac9_decoder = {
.close = atrac9_decode_close, .close = atrac9_decode_close,
FF_CODEC_DECODE_CB(atrac9_decode_frame), FF_CODEC_DECODE_CB(atrac9_decode_frame),
.flush = atrac9_decode_flush, .flush = atrac9_decode_flush,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
}; };

@ -602,7 +602,7 @@ static av_cold int ffat_close_decoder(AVCodecContext *avctx)
.p.priv_class = &ffat_##NAME##_dec_class, \ .p.priv_class = &ffat_##NAME##_dec_class, \
.bsfs = bsf_name, \ .bsfs = bsf_name, \
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, \
.p.wrapper_name = "at", \ .p.wrapper_name = "at", \
}; };

@ -634,7 +634,6 @@ static const AVOption options[] = {
AV_SAMPLE_FMT_S16, \ AV_SAMPLE_FMT_S16, \
AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE \ AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE \
}, \ }, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
.p.profiles = PROFILES, \ .p.profiles = PROFILES, \
.p.wrapper_name = "at", \ .p.wrapper_name = "at", \
}; };

@ -104,5 +104,4 @@ const FFCodec ff_aura2_decoder = {
.init = aura_decode_init, .init = aura_decode_init,
FF_CODEC_DECODE_CB(aura_decode_frame), FF_CODEC_DECODE_CB(aura_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1255,8 +1255,7 @@ const FFCodec ff_av1_decoder = {
.close = av1_decode_free, .close = av1_decode_free,
FF_CODEC_DECODE_CB(av1_decode_frame), FF_CODEC_DECODE_CB(av1_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_CLEANUP |
FF_CODEC_CAP_INIT_CLEANUP |
FF_CODEC_CAP_SETS_PKT_DTS, FF_CODEC_CAP_SETS_PKT_DTS,
.flush = av1_decode_flush, .flush = av1_decode_flush,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles), .p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),

@ -72,13 +72,13 @@ static AVMutex codec_mutex = AV_MUTEX_INITIALIZER;
static void lock_avcodec(const FFCodec *codec) static void lock_avcodec(const FFCodec *codec)
{ {
if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init) if (codec->caps_internal & FF_CODEC_CAP_NOT_INIT_THREADSAFE && codec->init)
ff_mutex_lock(&codec_mutex); ff_mutex_lock(&codec_mutex);
} }
static void unlock_avcodec(const FFCodec *codec) static void unlock_avcodec(const FFCodec *codec)
{ {
if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init) if (codec->caps_internal & FF_CODEC_CAP_NOT_INIT_THREADSAFE && codec->init)
ff_mutex_unlock(&codec_mutex); ff_mutex_unlock(&codec_mutex);
} }

@ -98,5 +98,5 @@ const FFCodec ff_avrn_decoder = {
.init = init, .init = init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -185,5 +185,4 @@ const FFCodec ff_avs_decoder = {
FF_CODEC_DECODE_CB(avs_decode_frame), FF_CODEC_DECODE_CB(avs_decode_frame),
.close = avs_decode_end, .close = avs_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -127,5 +127,4 @@ const FFCodec ff_avui_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.init = avui_decode_init, .init = avui_decode_init,
FF_CODEC_DECODE_CB(avui_decode_frame), FF_CODEC_DECODE_CB(avui_decode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -100,5 +100,4 @@ const FFCodec ff_avui_encoder = {
.p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE }, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE },
.init = avui_encode_init, .init = avui_encode_init,
FF_CODEC_ENCODE_CB(avui_encode_frame), FF_CODEC_ENCODE_CB(avui_encode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -168,5 +168,4 @@ const FFCodec ff_bethsoftvid_decoder = {
.close = bethsoftvid_decode_end, .close = bethsoftvid_decode_end,
FF_CODEC_DECODE_CB(bethsoftvid_decode_frame), FF_CODEC_DECODE_CB(bethsoftvid_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -185,5 +185,4 @@ const FFCodec ff_bfi_decoder = {
.close = bfi_decode_close, .close = bfi_decode_close,
FF_CODEC_DECODE_CB(bfi_decode_frame), FF_CODEC_DECODE_CB(bfi_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1430,5 +1430,5 @@ const FFCodec ff_bink_decoder = {
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.flush = flush, .flush = flush,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -376,7 +376,7 @@ const FFCodec ff_binkaudio_rdft_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_RECEIVE_FRAME_CB(binkaudio_receive_frame), FF_CODEC_RECEIVE_FRAME_CB(binkaudio_receive_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };
const FFCodec ff_binkaudio_dct_decoder = { const FFCodec ff_binkaudio_dct_decoder = {
@ -390,5 +390,5 @@ const FFCodec ff_binkaudio_dct_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_RECEIVE_FRAME_CB(binkaudio_receive_frame), FF_CODEC_RECEIVE_FRAME_CB(binkaudio_receive_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -226,7 +226,6 @@ const FFCodec ff_bintext_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
#if CONFIG_XBIN_DECODER #if CONFIG_XBIN_DECODER
@ -239,7 +238,6 @@ const FFCodec ff_xbin_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
#if CONFIG_IDF_DECODER #if CONFIG_IDF_DECODER
@ -252,6 +250,5 @@ const FFCodec ff_idf_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -154,5 +154,4 @@ const FFCodec ff_bitpacked_decoder = {
MKTAG('U', 'Y', 'V', 'Y'), MKTAG('U', 'Y', 'V', 'Y'),
FF_CODEC_TAGS_END, FF_CODEC_TAGS_END,
}, },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -115,5 +115,4 @@ const FFCodec ff_bitpacked_encoder = {
FF_CODEC_ENCODE_CB(encode_frame), FF_CODEC_ENCODE_CB(encode_frame),
.p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10, .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -170,5 +170,4 @@ const FFCodec ff_bmp_encoder = {
AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_MONOBLACK,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}, },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -86,5 +86,4 @@ const FFCodec ff_bmv_audio_decoder = {
.init = bmv_aud_decode_init, .init = bmv_aud_decode_init,
FF_CODEC_DECODE_CB(bmv_aud_decode_frame), FF_CODEC_DECODE_CB(bmv_aud_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -294,5 +294,4 @@ const FFCodec ff_bmv_video_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -268,5 +268,5 @@ const FFCodec ff_c93_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -1326,5 +1326,5 @@ const FFCodec ff_cavs_decoder = {
FF_CODEC_DECODE_CB(cavs_decode_frame), FF_CODEC_DECODE_CB(cavs_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.flush = cavs_flush, .flush = cavs_flush,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -956,5 +956,4 @@ const FFCodec ff_ccaption_decoder = {
.close = close_decoder, .close = close_decoder,
.flush = flush_decoder, .flush = flush_decoder,
FF_CODEC_DECODE_SUB_CB(decode), FF_CODEC_DECODE_SUB_CB(decode),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -398,5 +398,4 @@ const FFCodec ff_cdgraphics_decoder = {
FF_CODEC_DECODE_CB(cdg_decode_frame), FF_CODEC_DECODE_CB(cdg_decode_frame),
.flush = cdg_decode_flush, .flush = cdg_decode_flush,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -454,5 +454,4 @@ const FFCodec ff_cdtoons_decoder = {
FF_CODEC_DECODE_CB(cdtoons_decode_frame), FF_CODEC_DECODE_CB(cdtoons_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.flush = cdtoons_flush, .flush = cdtoons_flush,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -346,5 +346,4 @@ const FFCodec ff_cdxl_decoder = {
.close = cdxl_decode_end, .close = cdxl_decode_end,
FF_CODEC_DECODE_CB(cdxl_decode_frame), FF_CODEC_DECODE_CB(cdxl_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1466,5 +1466,5 @@ const FFCodec ff_cfhd_decoder = {
FF_CODEC_DECODE_CB(cfhd_decode), FF_CODEC_DECODE_CB(cfhd_decode),
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -862,5 +862,5 @@ const FFCodec ff_cfhd_encoder = {
AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP12,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}, },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -516,5 +516,4 @@ const FFCodec ff_cinepak_decoder = {
.close = cinepak_decode_end, .close = cinepak_decode_end,
FF_CODEC_DECODE_CB(cinepak_decode_frame), FF_CODEC_DECODE_CB(cinepak_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1225,5 +1225,5 @@ const FFCodec ff_cinepak_encoder = {
.close = cinepak_encode_end, .close = cinepak_encode_end,
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }, .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE },
.p.priv_class = &cinepak_class, .p.priv_class = &cinepak_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -777,5 +777,5 @@ const FFCodec ff_clearvideo_decoder = {
.close = clv_decode_end, .close = clv_decode_end,
FF_CODEC_DECODE_CB(clv_decode_frame), FF_CODEC_DECODE_CB(clv_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -89,6 +89,5 @@ const FFCodec ff_cljr_decoder = {
.init = decode_init, .init = decode_init,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -501,5 +501,4 @@ const FFCodec ff_cllc_decoder = {
FF_CODEC_DECODE_CB(cllc_decode_frame), FF_CODEC_DECODE_CB(cllc_decode_frame),
.close = cllc_decode_close, .close = cllc_decode_close,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -175,6 +175,5 @@ const FFCodec ff_comfortnoise_decoder = {
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -109,5 +109,5 @@ const FFCodec ff_comfortnoise_encoder = {
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } }, .p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -24,18 +24,13 @@
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "codec.h" #include "codec.h"
/**
* The codec does not modify any global variables in the init function,
* allowing to call the init function without locking any global mutexes.
*/
#define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0)
/** /**
* The codec is not known to be init-threadsafe (i.e. it might be unsafe * The codec is not known to be init-threadsafe (i.e. it might be unsafe
* to initialize this codec and another codec concurrently, typically because * to initialize this codec and another codec concurrently, typically because
* the codec calls external APIs that are not known to be thread-safe). * the codec calls external APIs that are not known to be thread-safe).
* Therefore calling the codec's init function needs to be guarded with a lock. * Therefore calling the codec's init function needs to be guarded with a lock.
*/ */
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 9) #define FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 0)
/** /**
* The codec allows calling the close function for deallocation even if * The codec allows calling the close function for deallocation even if
* the init function returned a failure. Without this capability flag, a * the init function returned a failure. Without this capability flag, a

@ -1308,5 +1308,5 @@ const FFCodec ff_cook_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -232,5 +232,4 @@ const FFCodec ff_cpia_decoder = {
.close = cpia_decode_end, .close = cpia_decode_end,
FF_CODEC_DECODE_CB(cpia_decode_frame), FF_CODEC_DECODE_CB(cpia_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -432,6 +432,6 @@ const FFCodec ff_cri_decoder = {
FF_CODEC_DECODE_CB(cri_decode_frame), FF_CODEC_DECODE_CB(cri_decode_frame),
.close = cri_decode_close, .close = cri_decode_close,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"), .p.long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
}; };

@ -177,5 +177,5 @@ const FFCodec ff_cscd_decoder = {
.close = decode_end, .close = decode_end,
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -186,7 +186,6 @@ const FFCodec ff_aura_decoder = {
.init = cyuv_decode_init, .init = cyuv_decode_init,
FF_CODEC_DECODE_CB(cyuv_decode_frame), FF_CODEC_DECODE_CB(cyuv_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
@ -200,6 +199,5 @@ const FFCodec ff_cyuv_decoder = {
.init = cyuv_decode_init, .init = cyuv_decode_init,
FF_CODEC_DECODE_CB(cyuv_decode_frame), FF_CODEC_DECODE_CB(cyuv_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif

@ -425,5 +425,5 @@ const FFCodec ff_dca_decoder = {
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
.p.priv_class = &dcadec_class, .p.priv_class = &dcadec_class,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles), .p.profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -1250,7 +1250,7 @@ const FFCodec ff_dca_encoder = {
.init = encode_init, .init = encode_init,
.close = encode_close, .close = encode_close,
FF_CODEC_ENCODE_CB(encode_frame), FF_CODEC_ENCODE_CB(encode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32, .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.p.supported_samplerates = sample_rates, .p.supported_samplerates = sample_rates,

@ -717,5 +717,4 @@ const FFCodec ff_dds_decoder = {
FF_CODEC_DECODE_CB(dds_decode), FF_CODEC_DECODE_CB(dds_decode),
.priv_data_size = sizeof(DDSContext), .priv_data_size = sizeof(DDSContext),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE
}; };

@ -431,5 +431,4 @@ const FFCodec ff_dfa_decoder = {
.close = dfa_decode_end, .close = dfa_decode_end,
FF_CODEC_DECODE_CB(dfa_decode_frame), FF_CODEC_DECODE_CB(dfa_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -134,5 +134,4 @@ const FFCodec ff_dfpwm_decoder = {
.init = dfpwm_dec_init, .init = dfpwm_dec_init,
FF_CODEC_DECODE_CB(dfpwm_dec_frame), FF_CODEC_DECODE_CB(dfpwm_dec_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -117,5 +117,4 @@ const FFCodec ff_dfpwm_encoder = {
FF_CODEC_ENCODE_CB(dfpwm_enc_frame), FF_CODEC_ENCODE_CB(dfpwm_enc_frame),
.p.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE}, .p.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE},
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -2366,6 +2366,5 @@ const FFCodec ff_dirac_decoder = {
.close = dirac_decode_end, .close = dirac_decode_end,
FF_CODEC_DECODE_CB(dirac_decode_frame), FF_CODEC_DECODE_CB(dirac_decode_frame),
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
.flush = dirac_decode_flush, .flush = dirac_decode_flush,
}; };

@ -736,5 +736,4 @@ const FFCodec ff_dnxhd_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
AV_CODEC_CAP_SLICE_THREADS, AV_CODEC_CAP_SLICE_THREADS,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles), .p.profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1374,5 +1374,5 @@ const FFCodec ff_dnxhd_encoder = {
.p.priv_class = &dnxhd_class, .p.priv_class = &dnxhd_class,
.defaults = dnxhd_defaults, .defaults = dnxhd_defaults,
.p.profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles), .p.profiles = NULL_IF_CONFIG_SMALL(ff_dnxhd_profiles),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -1310,5 +1310,5 @@ const FFCodec ff_dolby_e_decoder = {
.flush = dolby_e_flush, .flush = dolby_e_flush,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}; };

@ -419,7 +419,6 @@ const FFCodec ff_ ## name_ ## _decoder = { \
.priv_data_size = sizeof(DPCMContext), \ .priv_data_size = sizeof(DPCMContext), \
.init = dpcm_decode_init, \ .init = dpcm_decode_init, \
FF_CODEC_DECODE_CB(dpcm_decode_frame), \ FF_CODEC_DECODE_CB(dpcm_decode_frame), \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
} }
DPCM_DECODER(AV_CODEC_ID_DERF_DPCM, derf_dpcm, "DPCM Xilam DERF"); DPCM_DECODER(AV_CODEC_ID_DERF_DPCM, derf_dpcm, "DPCM Xilam DERF");

@ -292,5 +292,4 @@ const FFCodec ff_dpx_encoder = {
AV_PIX_FMT_GBRP10LE, AV_PIX_FMT_GBRP10BE, AV_PIX_FMT_GBRP10LE, AV_PIX_FMT_GBRP10BE,
AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRP12BE, AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRP12BE,
AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE},
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -125,7 +125,6 @@ const FFCodec ff_ ## name_ ## _decoder = { \
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS, \ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS, \
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \
AV_SAMPLE_FMT_NONE }, \ AV_SAMPLE_FMT_NONE }, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
}; };
DSD_DECODER(DSD_LSBF, dsd_lsbf, "DSD (Direct Stream Digital), least significant bit first") DSD_DECODER(DSD_LSBF, dsd_lsbf, "DSD (Direct Stream Digital), least significant bit first")

@ -130,5 +130,4 @@ const FFCodec ff_dsicinaudio_decoder = {
.init = cinaudio_decode_init, .init = cinaudio_decode_init,
FF_CODEC_DECODE_CB(cinaudio_decode_frame), FF_CODEC_DECODE_CB(cinaudio_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -330,6 +330,6 @@ const FFCodec ff_dsicinvideo_decoder = {
.init = cinvideo_decode_init, .init = cinvideo_decode_init,
.close = cinvideo_decode_end, .close = cinvideo_decode_end,
FF_CODEC_DECODE_CB(cinvideo_decode_frame), FF_CODEC_DECODE_CB(cinvideo_decode_frame),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
}; };

@ -781,5 +781,4 @@ const FFCodec ff_dss_sp_decoder = {
.init = dss_sp_decode_init, .init = dss_sp_decode_init,
FF_CODEC_DECODE_CB(dss_sp_decode_frame), FF_CODEC_DECODE_CB(dss_sp_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -390,5 +390,4 @@ const FFCodec ff_dst_decoder = {
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -127,5 +127,4 @@ const FFCodec ff_dvaudio_decoder = {
FF_CODEC_DECODE_CB(decode_frame), FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(DVAudioContext), .priv_data_size = sizeof(DVAudioContext),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -1579,5 +1579,4 @@ const FFCodec ff_dvbsub_decoder = {
.close = dvbsub_close_decoder, .close = dvbsub_close_decoder,
FF_CODEC_DECODE_SUB_CB(dvbsub_decode), FF_CODEC_DECODE_SUB_CB(dvbsub_decode),
.p.priv_class = &dvbsubdec_class, .p.priv_class = &dvbsubdec_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -691,5 +691,4 @@ const FFCodec ff_dvvideo_decoder = {
FF_CODEC_DECODE_CB(dvvideo_decode_frame), FF_CODEC_DECODE_CB(dvvideo_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS,
.p.max_lowres = 3, .p.max_lowres = 3,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

@ -715,5 +715,4 @@ const FFCodec ff_dvdsub_decoder = {
FF_CODEC_DECODE_SUB_CB(dvdsub_decode), FF_CODEC_DECODE_SUB_CB(dvdsub_decode),
.flush = dvdsub_flush, .flush = dvdsub_flush,
.p.priv_class = &dvdsub_class, .p.priv_class = &dvdsub_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save