summaryrefslogtreecommitdiff
path: root/libavcodec/dolby_e.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-01-26 17:14:05 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-01-30 05:14:45 +0100
commit44e27d937d88f3e7cdc83f4de1b9d3a590bcaa04 (patch)
treed5ac6333547dc0103848dcbe2b893e114d727feb /libavcodec/dolby_e.h
parent7c27513d0458c7e80925e27529acee4473baedf6 (diff)
avcodec/dolby_e: Avoid duplicating sample rate table
Set the sample rate when parsing the header instead and only copy the value in the decoder and the parser. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/dolby_e.h')
-rw-r--r--libavcodec/dolby_e.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/dolby_e.h b/libavcodec/dolby_e.h
index 32471bce80..9f0c065729 100644
--- a/libavcodec/dolby_e.h
+++ b/libavcodec/dolby_e.h
@@ -58,6 +58,8 @@ typedef struct DolbyEHeaderInfo {
* @{
*/
int multi_prog_warned;
+
+ int sample_rate;
/** @} */
} DolbyEHeaderInfo;
@@ -81,10 +83,6 @@ typedef struct DBEContext {
uint8_t buffer[1024 * 3 + AV_INPUT_BUFFER_PADDING_SIZE];
} DBEContext;
-static const uint16_t sample_rate_tab[16] = {
- 0, 42965, 43008, 44800, 53706, 53760
-};
-
/**
* Use the provided key to transform the input into data (put into s->buffer)
* suitable for further processing and initialize s->gb to read said data.