Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-03-30 01:46:53 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-08-04 20:18:34 +0300
commit6353720de4a245db824ab99a4389ea3d63caae93 (patch)
treebd7fdcfa52444aec7c76fd6617a9d157d43b31a5
parent0318b70db6fba7b0bcf45b99972ab5ef8c41c533 (diff)
aacdec: track pce directly instead of overriding chan_config
Modifying chan_config results in LATM decoding re-initializating every frame.
-rw-r--r--libavcodec/aacdec_template.c4
-rw-r--r--libavcodec/mpeg4audio.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index f84f49913e..b4a7d59dbb 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -561,7 +561,7 @@ static ChannelElement *get_che(AACContext *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.
@@ -3063,7 +3063,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
} 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;
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
index 8fd32f96b3..178bef26e2 100644
--- a/libavcodec/mpeg4audio.h
+++ b/libavcodec/mpeg4audio.h
@@ -39,6 +39,7 @@ typedef struct MPEG4AudioConfig {
int channels;
int ps; ///< -1 implicit, 1 presence
int frame_length_short;
+ int pce;
} MPEG4AudioConfig;
extern av_export const int avpriv_mpeg4audio_sample_rates[16];