summaryrefslogtreecommitdiffstats
path: root/audio/decode
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-04-10 01:47:05 -0400
committerKacper Michajłow <kasper93@gmail.com>2024-04-10 19:00:22 +0200
commit9bb7d96bf969f1bba3211c4eb802f8a6c391c392 (patch)
treef73037a64b5dca8163b16e0f5fe97425eefd84a4 /audio/decode
parent06f88dfb3a86e5d037d885319fbf93fc46d95371 (diff)
downloadmpv-9bb7d96bf969f1bba3211c4eb802f8a6c391c392.tar.bz2
mpv-9bb7d96bf969f1bba3211c4eb802f8a6c391c392.tar.xz
various: make filter internal function names more descriptive
Lots of filters have generic internal function names like "process". On a stack trace, all of the different filters use this name, which causes confusion of the actual filter being processed. This renames these internal function names to carry the filter names. This matches what had already been done for some filters.
Diffstat (limited to 'audio/decode')
-rw-r--r--audio/decode/ad_lavc.c12
-rw-r--r--audio/decode/ad_spdif.c10
2 files changed, 11 insertions, 11 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index 08b789a709..11a5f131d7 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -156,7 +156,7 @@ static bool init(struct mp_filter *da, struct mp_codec_params *codec,
return true;
}
-static void destroy(struct mp_filter *da)
+static void ad_lavc_destroy(struct mp_filter *da)
{
struct priv *ctx = da->priv;
@@ -165,7 +165,7 @@ static void destroy(struct mp_filter *da)
mp_free_av_packet(&ctx->avpkt);
}
-static void reset(struct mp_filter *da)
+static void ad_lavc_reset(struct mp_filter *da)
{
struct priv *ctx = da->priv;
@@ -276,7 +276,7 @@ static int receive_frame(struct mp_filter *da, struct mp_frame *out)
return ret;
}
-static void process(struct mp_filter *ad)
+static void ad_lavc_process(struct mp_filter *ad)
{
struct priv *priv = ad->priv;
@@ -286,9 +286,9 @@ static void process(struct mp_filter *ad)
static const struct mp_filter_info ad_lavc_filter = {
.name = "ad_lavc",
.priv_size = sizeof(struct priv),
- .process = process,
- .reset = reset,
- .destroy = destroy,
+ .process = ad_lavc_process,
+ .reset = ad_lavc_reset,
+ .destroy = ad_lavc_destroy,
};
static struct mp_decoder *create(struct mp_filter *parent,
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c
index 893b8b9d55..98a53f3ca0 100644
--- a/audio/decode/ad_spdif.c
+++ b/audio/decode/ad_spdif.c
@@ -79,7 +79,7 @@ static int write_packet(void *p, const uint8_t *buf, int buf_size)
}
// (called on both filter destruction _and_ if lavf fails to init)
-static void destroy(struct mp_filter *da)
+static void ad_spdif_destroy(struct mp_filter *da)
{
struct spdifContext *spdif_ctx = da->priv;
AVFormatContext *lavf_ctx = spdif_ctx->lavf_ctx;
@@ -283,12 +283,12 @@ static int init_filter(struct mp_filter *da)
return 0;
fail:
- destroy(da);
+ ad_spdif_destroy(da);
mp_filter_internal_mark_failed(da);
return -1;
}
-static void process(struct mp_filter *da)
+static void ad_spdif_process(struct mp_filter *da)
{
struct spdifContext *spdif_ctx = da->priv;
@@ -413,8 +413,8 @@ struct mp_decoder_list *select_spdif_codec(const char *codec, const char *pref)
static const struct mp_filter_info ad_spdif_filter = {
.name = "ad_spdif",
.priv_size = sizeof(struct spdifContext),
- .process = process,
- .destroy = destroy,
+ .process = ad_spdif_process,
+ .destroy = ad_spdif_destroy,
};
static struct mp_decoder *create(struct mp_filter *parent,