mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: ffmpeg: set spa_handle_factory::version
Initialize the version with the `SPA_VERSION_HANDLE_FACTORY` macro. This way `spa-inspect` can properly inspect the factory.
This commit is contained in:
parent
de5a85d808
commit
96d0902dc8
1 changed files with 5 additions and 5 deletions
|
|
@ -127,8 +127,12 @@ static const AVCodec *find_codec_by_index(uint32_t index)
|
|||
SPA_EXPORT
|
||||
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
|
||||
{
|
||||
static struct spa_handle_factory f;
|
||||
static char name[128];
|
||||
static struct spa_handle_factory f = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
.name = name,
|
||||
.enum_interface_info = ffmpeg_enum_interface_info,
|
||||
};
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 10, 100)
|
||||
avcodec_register_all();
|
||||
|
|
@ -149,10 +153,6 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
|
|||
f.init = ffmpeg_dec_init;
|
||||
}
|
||||
|
||||
f.name = name;
|
||||
f.info = NULL;
|
||||
f.enum_interface_info = ffmpeg_enum_interface_info;
|
||||
|
||||
*factory = &f;
|
||||
(*index)++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue