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
8d71a84881
commit
7336410839
@ -590,7 +590,7 @@ ChannelElement *ff_aac_get_che(AACDecContext *ac, int type, int elem_id)
|
||||
{
|
||||
/* For PCE based channel configurations map the channels solely based
|
||||
* 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];
|
||||
}
|
||||
// Allow single CPE stereo files to be signalled with mono configuration.
|
||||
@ -2288,7 +2288,7 @@ static int decode_frame_ga(AVCodecContext *avctx, AACDecContext *ac,
|
||||
} else {
|
||||
err = ff_aac_output_configure(ac, layout_map, tags, OC_TRIAL_PCE, 1);
|
||||
if (!err)
|
||||
ac->oc[1].m4ac.chan_config = 0;
|
||||
ac->oc[1].m4ac.pce = 1;
|
||||
pce_found = 1;
|
||||
}
|
||||
break;
|
||||
|
@ -39,6 +39,7 @@ typedef struct MPEG4AudioConfig {
|
||||
int channels;
|
||||
int ps; ///< -1 implicit, 1 presence
|
||||
int frame_length_short;
|
||||
int pce;
|
||||
} MPEG4AudioConfig;
|
||||
|
||||
extern const int ff_mpeg4audio_sample_rates[16];
|
||||
|
Loading…
Reference in New Issue
Block a user