aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avformat.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2025-02-19 12:47:24 -0300
committerJames Almer <jamrial@gmail.com>2025-03-28 14:33:07 -0300
commitec8e796b42bccf999fdf31c110385e2cc119b7f2 (patch)
tree628602fe58d7fec9bda484c195635e7817be2fbe /libavformat/avformat.c
parentc153238275c28ec1891df696114c152285dc9680 (diff)
downloadffmpeg-ec8e796b42bccf999fdf31c110385e2cc119b7f2.tar.gz
avformat: remove deprecated FF_API_AVSTREAM_SIDE_DATA
Deprecated since 2023-10-06. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/avformat.c')
-rw-r--r--libavformat/avformat.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index f53299cc40..18ca4643ee 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -50,14 +50,6 @@ void ff_free_stream(AVStream **pst)
if (!st)
return;
-#if FF_API_AVSTREAM_SIDE_DATA
-FF_DISABLE_DEPRECATION_WARNINGS
- for (int i = 0; i < st->nb_side_data; i++)
- av_freep(&st->side_data[i].data);
- av_freep(&st->side_data);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (st->attached_pic.data)
av_packet_unref(&st->attached_pic);
@@ -199,78 +191,6 @@ void avformat_free_context(AVFormatContext *s)
av_free(s);
}
-#if FF_API_AVSTREAM_SIDE_DATA
-FF_DISABLE_DEPRECATION_WARNINGS
-uint8_t *av_stream_get_side_data(const AVStream *st,
- enum AVPacketSideDataType type, size_t *size)
-{
- for (int i = 0; i < st->nb_side_data; i++) {
- if (st->side_data[i].type == type) {
- if (size)
- *size = st->side_data[i].size;
- return st->side_data[i].data;
- }
- }
- if (size)
- *size = 0;
- return NULL;
-}
-
-int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
- uint8_t *data, size_t size)
-{
- AVPacketSideData *sd, *tmp;
-
- for (int i = 0; i < st->nb_side_data; i++) {
- sd = &st->side_data[i];
-
- if (sd->type == type) {
- av_freep(&sd->data);
- sd->data = data;
- sd->size = size;
- return 0;
- }
- }
-
- if (st->nb_side_data + 1U > FFMIN(INT_MAX, SIZE_MAX / sizeof(*tmp)))
- return AVERROR(ERANGE);
-
- tmp = av_realloc_array(st->side_data, st->nb_side_data + 1, sizeof(*tmp));
- if (!tmp) {
- return AVERROR(ENOMEM);
- }
-
- st->side_data = tmp;
- st->nb_side_data++;
-
- sd = &st->side_data[st->nb_side_data - 1];
- sd->type = type;
- sd->data = data;
- sd->size = size;
-
- return 0;
-}
-
-uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
- size_t size)
-{
- int ret;
- uint8_t *data = av_malloc(size);
-
- if (!data)
- return NULL;
-
- ret = av_stream_add_side_data(st, type, data, size);
- if (ret < 0) {
- av_freep(&data);
- return NULL;
- }
-
- return data;
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
/**
* Copy all stream parameters from source to destination stream, with the
* exception of the index field, which is usually set by avformat_new_stream().