aacdec: track pce directly instead of overriding chan_config
Modifying chan_config results in LATM decoding re-initializating every frame.
This commit is contained in:
parent
042258f929
commit
e98f5632ab
|
@ -577,7 +577,7 @@ static ChannelElement *get_che(AACDecContext *ac, int type, int elem_id)
|
||||||
{
|
{
|
||||||
/* For PCE based channel configurations map the channels solely based
|
/* For PCE based channel configurations map the channels solely based
|
||||||
* on tags. */
|
* on tags. */
|
||||||
if (!ac->oc[1].m4ac.chan_config) {
|
if (!ac->oc[1].m4ac.chan_config || ac->oc[1].m4ac.pce) {
|
||||||
return ac->tag_che_map[type][elem_id];
|
return ac->tag_che_map[type][elem_id];
|
||||||
}
|
}
|
||||||
// Allow single CPE stereo files to be signalled with mono configuration.
|
// Allow single CPE stereo files to be signalled with mono configuration.
|
||||||
|
@ -3219,7 +3219,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame,
|
||||||
} else {
|
} else {
|
||||||
err = output_configure(ac, layout_map, tags, OC_TRIAL_PCE, 1);
|
err = output_configure(ac, layout_map, tags, OC_TRIAL_PCE, 1);
|
||||||
if (!err)
|
if (!err)
|
||||||
ac->oc[1].m4ac.chan_config = 0;
|
ac->oc[1].m4ac.pce = 1;
|
||||||
pce_found = 1;
|
pce_found = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -39,6 +39,7 @@ typedef struct MPEG4AudioConfig {
|
||||||
int channels;
|
int channels;
|
||||||
int ps; ///< -1 implicit, 1 presence
|
int ps; ///< -1 implicit, 1 presence
|
||||||
int frame_length_short;
|
int frame_length_short;
|
||||||
|
int pce;
|
||||||
} MPEG4AudioConfig;
|
} MPEG4AudioConfig;
|
||||||
|
|
||||||
extern const int ff_mpeg4audio_sample_rates[16];
|
extern const int ff_mpeg4audio_sample_rates[16];
|
||||||
|
|
Loading…
Reference in New Issue