Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From: Hendrik Leppkes <h.leppkes@gmail.com>
- Date: Wed, 29 Mar 2017 22:46:53 +0000 (+0200)
- Subject: aacdec: track pce directly instead of overriding chan_config
- aacdec: track pce directly instead of overriding chan_config
- Modifying chan_config results in LATM decoding re-initializating every frame.
- ---
- diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
- index ec8b7c3b11..b3010698e3 100644
- --- a/libavcodec/aacdec_template.c
- +++ b/libavcodec/aacdec_template.c
- @@ -557,7 +557,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.
- @@ -3040,7 +3040,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];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement