From de5a85d808c77099a22e6a55d328f1b9653babee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 16 Jun 2022 17:22:35 +0200 Subject: [PATCH] spa: ffmpeg: implement spa_handle::clear Implement the spa_handle::clear method for both the encoder and decoder. At the moment, they both do nothing. --- spa/plugins/ffmpeg/ffmpeg-dec.c | 9 +++++++++ spa/plugins/ffmpeg/ffmpeg-enc.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/spa/plugins/ffmpeg/ffmpeg-dec.c b/spa/plugins/ffmpeg/ffmpeg-dec.c index cab58ba69..e9c4c1e30 100644 --- a/spa/plugins/ffmpeg/ffmpeg-dec.c +++ b/spa/plugins/ffmpeg/ffmpeg-dec.c @@ -458,6 +458,14 @@ impl_get_interface(struct spa_handle *handle, const char *type, void **interface return 0; } +static int +impl_clear(struct spa_handle *handle) +{ + spa_return_val_if_fail(handle != NULL, -EINVAL); + + return 0; +} + size_t spa_ffmpeg_dec_get_size(const struct spa_handle_factory *factory, const struct spa_dict *params) { @@ -474,6 +482,7 @@ spa_ffmpeg_dec_init(struct spa_handle *handle, struct port *port; handle->get_interface = impl_get_interface; + handle->clear = impl_clear; this = (struct impl *) handle; diff --git a/spa/plugins/ffmpeg/ffmpeg-enc.c b/spa/plugins/ffmpeg/ffmpeg-enc.c index 4123c2a29..621818386 100644 --- a/spa/plugins/ffmpeg/ffmpeg-enc.c +++ b/spa/plugins/ffmpeg/ffmpeg-enc.c @@ -437,6 +437,14 @@ impl_get_interface(struct spa_handle *handle, const char *type, void **interface return 0; } +static int +impl_clear(struct spa_handle *handle) +{ + spa_return_val_if_fail(handle != NULL, -EINVAL); + + return 0; +} + size_t spa_ffmpeg_enc_get_size(const struct spa_handle_factory *factory, const struct spa_dict *params) { @@ -452,6 +460,7 @@ spa_ffmpeg_enc_init(struct spa_handle *handle, struct port *port; handle->get_interface = impl_get_interface; + handle->clear = impl_clear; this = (struct impl *) handle;