diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-04-10 16:27:28 -0700 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2012-04-16 14:09:52 -0700 |
commit | 9fb7e14635026989d9f3e157be9ff6019139b654 (patch) | |
tree | dc65e435f9af40c0e849b3830b9c93742daf6490 /libavcodec/aac.h | |
parent | af2f655c02c69aa615eb2a06000a1aa35916967a (diff) | |
download | ffmpeg-9fb7e14635026989d9f3e157be9ff6019139b654.tar.gz |
aacdec: More robust output configuration.
Save the old output configuration (if it has been used
successfully) when trying a new configuration. If the new configuration
fails to decode, restore the last successful configuration.
Diffstat (limited to 'libavcodec/aac.h')
-rw-r--r-- | libavcodec/aac.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/aac.h b/libavcodec/aac.h index 49def78979..1b6013e458 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -112,6 +112,15 @@ enum OCStatus { OC_LOCKED, ///< Output configuration locked in place }; +typedef struct { + MPEG4AudioConfig m4ac; + uint8_t layout_map[MAX_ELEM_ID*4][3]; + int layout_map_tags; + int channels; + uint64_t channel_layout; + enum OCStatus status; +} OutputConfiguration; + /** * Predictor State */ @@ -254,8 +263,6 @@ typedef struct { AVCodecContext *avctx; AVFrame frame; - MPEG4AudioConfig m4ac; - int is_saved; ///< Set if elements have stored overlap from previous frame. DynamicRangeControl che_drc; @@ -263,8 +270,6 @@ typedef struct { * @name Channel element related data * @{ */ - uint8_t layout_map[MAX_ELEM_ID*4][3]; - int layout_map_tags; ChannelElement *che[4][MAX_ELEM_ID]; ChannelElement *tag_che_map[4][MAX_ELEM_ID]; int tags_mapped; @@ -299,7 +304,7 @@ typedef struct { DECLARE_ALIGNED(32, float, temp)[128]; - enum OCStatus output_configured; + OutputConfiguration oc[2]; } AACContext; #endif /* AVCODEC_AAC_H */ |