mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/iamf: remove duplicated function
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
4a134eb14a
commit
ec7937f4a5
|
@ -165,6 +165,20 @@ struct IAMFSoundSystemMap {
|
|||
extern const AVChannelLayout ff_iamf_scalable_ch_layouts[10];
|
||||
extern const struct IAMFSoundSystemMap ff_iamf_sound_system_map[13];
|
||||
|
||||
static inline IAMFParamDefinition *ff_iamf_get_param_definition(const IAMFContext *iamf,
|
||||
unsigned int parameter_id)
|
||||
{
|
||||
IAMFParamDefinition *param_definition = NULL;
|
||||
|
||||
for (int i = 0; i < iamf->nb_param_definitions; i++)
|
||||
if (iamf->param_definitions[i]->param->parameter_id == parameter_id) {
|
||||
param_definition = iamf->param_definitions[i];
|
||||
break;
|
||||
}
|
||||
|
||||
return param_definition;
|
||||
}
|
||||
|
||||
void ff_iamf_free_audio_element(IAMFAudioElement **paudio_element);
|
||||
void ff_iamf_free_mix_presentation(IAMFMixPresentation **pmix_presentation);
|
||||
void ff_iamf_uninit_context(IAMFContext *c);
|
||||
|
|
|
@ -98,22 +98,6 @@ static int audio_frame_obu(AVFormatContext *s, const IAMFDemuxContext *c,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const IAMFParamDefinition *get_param_definition(AVFormatContext *s,
|
||||
const IAMFDemuxContext *c,
|
||||
unsigned int parameter_id)
|
||||
{
|
||||
const IAMFContext *const iamf = &c->iamf;
|
||||
const IAMFParamDefinition *param_definition = NULL;
|
||||
|
||||
for (int i = 0; i < iamf->nb_param_definitions; i++)
|
||||
if (iamf->param_definitions[i]->param->parameter_id == parameter_id) {
|
||||
param_definition = iamf->param_definitions[i];
|
||||
break;
|
||||
}
|
||||
|
||||
return param_definition;
|
||||
}
|
||||
|
||||
static int parameter_block_obu(AVFormatContext *s, IAMFDemuxContext *c,
|
||||
AVIOContext *pbc, int len)
|
||||
{
|
||||
|
@ -144,7 +128,7 @@ static int parameter_block_obu(AVFormatContext *s, IAMFDemuxContext *c,
|
|||
pb = &b.pub;
|
||||
|
||||
parameter_id = ffio_read_leb(pb);
|
||||
param_definition = get_param_definition(s, c, parameter_id);
|
||||
param_definition = ff_iamf_get_param_definition(&c->iamf, parameter_id);
|
||||
if (!param_definition) {
|
||||
av_log(s, AV_LOG_VERBOSE, "Non existant parameter_id %d referenced in a parameter block. Ignoring\n",
|
||||
parameter_id);
|
||||
|
|
|
@ -29,20 +29,6 @@
|
|||
#include "avio.h"
|
||||
#include "iamf.h"
|
||||
|
||||
static inline IAMFParamDefinition *ff_iamf_get_param_definition(const IAMFContext *iamf,
|
||||
unsigned int parameter_id)
|
||||
{
|
||||
IAMFParamDefinition *param_definition = NULL;
|
||||
|
||||
for (int i = 0; i < iamf->nb_param_definitions; i++)
|
||||
if (iamf->param_definitions[i]->param->parameter_id == parameter_id) {
|
||||
param_definition = iamf->param_definitions[i];
|
||||
break;
|
||||
}
|
||||
|
||||
return param_definition;
|
||||
}
|
||||
|
||||
int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void *log_ctx);
|
||||
int ff_iamf_add_mix_presentation(IAMFContext *iamf, const AVStreamGroup *stg, void *log_ctx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue