From 1313f287e5508ddee514ef5242339cd5edb1bf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Tue, 14 Mar 2023 23:31:52 +0200 Subject: [PATCH] common/av_common: clean up mp_lavc_set_extradata It no longer has any users, as the last ones (subtitle decoders) were switched to mp_set_avctx_codec_headers. --- common/av_common.c | 14 -------------- common/av_common.h | 1 - 2 files changed, 15 deletions(-) diff --git a/common/av_common.c b/common/av_common.c index 89a647593f..5d07349af0 100644 --- a/common/av_common.c +++ b/common/av_common.c @@ -40,20 +40,6 @@ #include "av_common.h" #include "codecs.h" -int mp_lavc_set_extradata(AVCodecContext *avctx, void *ptr, int size) -{ - if (size) { - av_free(avctx->extradata); - avctx->extradata_size = 0; - avctx->extradata = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!avctx->extradata) - return -1; - avctx->extradata_size = size; - memcpy(avctx->extradata, ptr, size); - } - return 0; -} - enum AVMediaType mp_to_av_stream_type(int type) { switch (type) { diff --git a/common/av_common.h b/common/av_common.h index 2c97ad19cc..1f05e14fab 100644 --- a/common/av_common.h +++ b/common/av_common.h @@ -31,7 +31,6 @@ struct mp_codec_params; struct AVDictionary; struct mp_log; -int mp_lavc_set_extradata(AVCodecContext *avctx, void *ptr, int size); enum AVMediaType mp_to_av_stream_type(int type); AVCodecParameters *mp_codec_params_to_av(const struct mp_codec_params *c); int mp_set_avctx_codec_headers(AVCodecContext *avctx, const struct mp_codec_params *c);