summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-09-04 09:39:07 -0300
committerJames Almer <jamrial@gmail.com>2023-09-06 10:27:45 -0300
commit0231df505dc70ac435f2b437d1995ebabd70a66a (patch)
tree7c93bb70f0122010e6673dddaa0ae7c5f5b4ad5e /libavcodec/utils.c
parent3744ada3b8fddce4ee7915152a2b066e690c7370 (diff)
avcodec/utils: move ff_add_cpb_side_data() to encoder code
It's only used by encoders, so move it to prevent wrong usage. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index bd4131db62..d54e050848 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1018,37 +1018,6 @@ AVCPBProperties *av_cpb_properties_alloc(size_t *size)
return props;
}
-AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx)
-{
- AVPacketSideData *tmp;
- AVCPBProperties *props;
- size_t size;
- int i;
-
- for (i = 0; i < avctx->nb_coded_side_data; i++)
- if (avctx->coded_side_data[i].type == AV_PKT_DATA_CPB_PROPERTIES)
- return (AVCPBProperties *)avctx->coded_side_data[i].data;
-
- props = av_cpb_properties_alloc(&size);
- if (!props)
- return NULL;
-
- tmp = av_realloc_array(avctx->coded_side_data, avctx->nb_coded_side_data + 1, sizeof(*tmp));
- if (!tmp) {
- av_freep(&props);
- return NULL;
- }
-
- avctx->coded_side_data = tmp;
- avctx->nb_coded_side_data++;
-
- avctx->coded_side_data[avctx->nb_coded_side_data - 1].type = AV_PKT_DATA_CPB_PROPERTIES;
- avctx->coded_side_data[avctx->nb_coded_side_data - 1].data = (uint8_t*)props;
- avctx->coded_side_data[avctx->nb_coded_side_data - 1].size = size;
-
- return props;
-}
-
static unsigned bcd2uint(uint8_t bcd)
{
unsigned low = bcd & 0xf;