summaryrefslogtreecommitdiff
path: root/libavcodec/dolby_e_parser.c
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_parser.c
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_parser.c')
-rw-r--r--libavcodec/dolby_e_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dolby_e_parser.c b/libavcodec/dolby_e_parser.c
index 8e713b44ed..3ae973bddf 100644
--- a/libavcodec/dolby_e_parser.c
+++ b/libavcodec/dolby_e_parser.c
@@ -51,7 +51,7 @@ static int dolby_e_parse(AVCodecParserContext *s2, AVCodecContext *avctx,
}
avctx->channels = s->metadata.nb_channels;
- avctx->sample_rate = sample_rate_tab[s->metadata.fr_code];
+ avctx->sample_rate = s->metadata.sample_rate;
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
end: