diff options
author | James Almer <jamrial@gmail.com> | 2020-10-26 11:18:03 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-10-28 11:59:35 -0300 |
commit | 37d742b607d47122d23d548ffd7ad9b09cbc5298 (patch) | |
tree | 4f5a60c4d9b67170e2807939616891c560f4630c /libavcodec | |
parent | 7f76974e7d42c492ff6978b9d72ff618e8e2ccab (diff) | |
download | ffmpeg-37d742b607d47122d23d548ffd7ad9b09cbc5298.tar.gz |
avcodec/codec2utils: move the remaining avpriv functions to lavf
They are only used by the codec2 demuxers.
The symbols are kept around until the next major bump.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/codec2utils.c | 2 | ||||
-rw-r--r-- | libavcodec/codec2utils.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/codec2utils.c b/libavcodec/codec2utils.c index f1b6e56526..a942662403 100644 --- a/libavcodec/codec2utils.c +++ b/libavcodec/codec2utils.c @@ -23,6 +23,7 @@ #include "internal.h" #include "libavcodec/codec2utils.h" +#if LIBAVCODEC_VERSION_MAJOR < 59 int avpriv_codec2_mode_bit_rate(void *logctx, int mode) { int frame_size = avpriv_codec2_mode_frame_size(logctx, mode); @@ -78,3 +79,4 @@ int avpriv_codec2_mode_block_align(void *logctx, int mode) return block_align_table[mode]; } } +#endif diff --git a/libavcodec/codec2utils.h b/libavcodec/codec2utils.h index 2ee7a592a1..37f0693dc7 100644 --- a/libavcodec/codec2utils.h +++ b/libavcodec/codec2utils.h @@ -24,6 +24,8 @@ #include <stdint.h> +#include "version.h" + //Highest mode we're willing to use. //Don't want to let users accidentally produce files that can't be decoded in the future. //CODEC2_MODE_WB (9) is experimental/unstable as of 2017-11-23. @@ -45,6 +47,7 @@ { "700B", "700B", 0, AV_OPT_TYPE_CONST, {.i64 = 7}, .flags=option_flags, .unit="codec2_mode"},\ { "700C", "700C", 0, AV_OPT_TYPE_CONST, {.i64 = 8}, .flags=option_flags, .unit="codec2_mode"} +#if LIBAVCODEC_VERSION_MAJOR < 59 //The three following functions are here to avoid needing libavformat/codec2.c to depend on libcodec2 //Computes bitrate from mode, with frames rounded up to the nearest octet. @@ -58,6 +61,7 @@ int avpriv_codec2_mode_frame_size(void *logctx, int mode); //Mimics (codec2_bits_per_frame()+7)/8 int avpriv_codec2_mode_block_align(void *logctx, int mode); +#endif #define CODEC2_EXTRADATA_SIZE 4 |