aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-09-09 23:12:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-11-28 00:41:51 +0100
commit34f5a59ad5aa8baad2036321f63bf1e34ffdefb9 (patch)
tree3791a6611b545b386384ae511e3c631d07e90865
parent7a95cf86ff6b681b2ef43660c769a9b3cfd82e6a (diff)
downloadffmpeg-34f5a59ad5aa8baad2036321f63bf1e34ffdefb9.tar.gz
avcodec: Set AV_CODEC_CAP_CHANNEL_CONF in more decoders
Suggested-by: Paul B Mahol <onemda@gmail.com> See: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channels Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ac3dec_fixed.c3
-rw-r--r--libavcodec/ac3dec_float.c6
-rw-r--r--libavcodec/adxdec.c3
-rw-r--r--libavcodec/flacdec.c4
-rw-r--r--libavcodec/mpegaudiodec_fixed.c15
-rw-r--r--libavcodec/mpegaudiodec_float.c15
-rw-r--r--libavcodec/pcm-dvd.c3
-rw-r--r--libavcodec/ralf.c3
-rw-r--r--libavcodec/s302m.c3
-rw-r--r--libavcodec/shorten.c5
-rw-r--r--libavcodec/siren.c3
11 files changed, 43 insertions, 20 deletions
diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
index 336a538cad..f36854cdc5 100644
--- a/libavcodec/ac3dec_fixed.c
+++ b/libavcodec/ac3dec_fixed.c
@@ -176,7 +176,8 @@ AVCodec ff_ac3_fixed_decoder = {
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/ac3dec_float.c b/libavcodec/ac3dec_float.c
index b85a4ce336..57a626a181 100644
--- a/libavcodec/ac3dec_float.c
+++ b/libavcodec/ac3dec_float.c
@@ -61,7 +61,8 @@ AVCodec ff_ac3_decoder = {
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
@@ -84,7 +85,8 @@ AVCodec ff_eac3_decoder = {
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c
index 81ffc8b296..35b20c5cf4 100644
--- a/libavcodec/adxdec.c
+++ b/libavcodec/adxdec.c
@@ -199,7 +199,8 @@ AVCodec ff_adpcm_adx_decoder = {
.init = adx_decode_init,
.decode = adx_decode_frame,
.flush = adx_decode_flush,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
};
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index d1cf82b541..cf6128f897 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -669,7 +669,9 @@ AVCodec ff_flac_decoder = {
.init = flac_decode_init,
.close = flac_decode_close,
.decode = flac_decode_frame,
- .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1 |
+ AV_CODEC_CAP_FRAME_THREADS,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S32,
diff --git a/libavcodec/mpegaudiodec_fixed.c b/libavcodec/mpegaudiodec_fixed.c
index a2c433954b..5ba1cc66fb 100644
--- a/libavcodec/mpegaudiodec_fixed.c
+++ b/libavcodec/mpegaudiodec_fixed.c
@@ -47,7 +47,8 @@ AVCodec ff_mp1_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
@@ -63,7 +64,8 @@ AVCodec ff_mp2_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
@@ -79,7 +81,8 @@ AVCodec ff_mp3_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
@@ -95,7 +98,8 @@ AVCodec ff_mp3adu_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
@@ -112,7 +116,8 @@ AVCodec ff_mp3on4_decoder = {
.init = decode_init_mp3on4,
.close = decode_close_mp3on4,
.decode = decode_frame_mp3on4,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush_mp3on4,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c
index 4aa52d4f53..11cf7e6bf1 100644
--- a/libavcodec/mpegaudiodec_float.c
+++ b/libavcodec/mpegaudiodec_float.c
@@ -47,7 +47,8 @@ AVCodec ff_mp1float_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
@@ -63,7 +64,8 @@ AVCodec ff_mp2float_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
@@ -79,7 +81,8 @@ AVCodec ff_mp3float_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
@@ -95,7 +98,8 @@ AVCodec ff_mp3adufloat_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_FLT,
@@ -112,7 +116,8 @@ AVCodec ff_mp3on4float_decoder = {
.init = decode_init_mp3on4,
.close = decode_close_mp3on4,
.decode = decode_frame_mp3on4,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.flush = flush_mp3on4,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 725c2f5b29..becb572953 100644
--- a/libavcodec/pcm-dvd.c
+++ b/libavcodec/pcm-dvd.c
@@ -299,7 +299,8 @@ AVCodec ff_pcm_dvd_decoder = {
.priv_data_size = sizeof(PCMDVDContext),
.init = pcm_dvd_decode_init,
.decode = pcm_dvd_decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE
}
diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c
index 0080b23941..dc012d71b1 100644
--- a/libavcodec/ralf.c
+++ b/libavcodec/ralf.c
@@ -535,7 +535,8 @@ AVCodec ff_ralf_decoder = {
.close = decode_close,
.decode = decode_frame,
.flush = decode_flush,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
};
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index 584b58e28e..113590aee4 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -225,6 +225,7 @@ AVCodec ff_s302m_decoder = {
.id = AV_CODEC_ID_S302M,
.priv_data_size = sizeof(S302Context),
.decode = s302m_decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.priv_class = &s302m_class,
};
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 4134af74cf..517942c1b0 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -808,7 +808,10 @@ AVCodec ff_shorten_decoder = {
.init = shorten_decode_init,
.close = shorten_decode_close,
.decode = shorten_decode_frame,
- .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DELAY |
+ AV_CODEC_CAP_DR1 |
+ AV_CODEC_CAP_SUBFRAMES ,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_U8P,
AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 1c17d4505d..b1b4944562 100644
--- a/libavcodec/siren.c
+++ b/libavcodec/siren.c
@@ -774,7 +774,8 @@ AVCodec ff_siren_decoder = {
.close = siren_close,
.decode = siren_decode,
.flush = siren_flush,
- .capabilities = AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_CHANNEL_CONF |
+ AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP,
};