1
0

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:
Hendrik Leppkes 2017-03-30 00:46:53 +02:00
parent 8d71a84881
commit 7336410839
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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];