1
0
Fork 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 042258f929
commit e98f5632ab
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
2 changed files with 3 additions and 2 deletions

View File

@ -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
* 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.
@ -3219,7 +3219,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame,
} else {
err = 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];