diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2020-02-20 23:04:50 +0200 |
---|---|---|
committer | Anssi Hannula <anssi.hannula@iki.fi> | 2020-02-20 23:04:50 +0200 |
commit | 56df8296f5221524bd06e91e6639c08753d1b8a0 (patch) | |
tree | 09f2616b86076738dc79681af4e69546ab7bd0d6 /libavformat/spdifenc.c | |
parent | 36e156bef02566d70cea46cc5e00b3e5d5ed3286 (diff) | |
download | ffmpeg-56df8296f5221524bd06e91e6639c08753d1b8a0.tar.gz |
avformat/spdifenc: fix TrueHD streams over 48kHz
Commit 36e156bef02 ("avformat/spdifenc: fix handling of large TrueHD
frame") added an obviously incorrect bitshift that caused incorrect
samples-per-frame calculation for TrueHD streams over 48kHz.
Fix that.
Diffstat (limited to 'libavformat/spdifenc.c')
-rw-r--r-- | libavformat/spdifenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index dcfab87cc4..0288872fd3 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -435,9 +435,9 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt) if (AV_RB24(pkt->data + 4) == 0xf8726f) { /* major sync unit, fetch sample rate */ if (pkt->data[7] == 0xba) - ratebits = pkt->data[8] >> 8; + ratebits = pkt->data[8] >> 4; else if (pkt->data[7] == 0xbb) - ratebits = pkt->data[9] >> 8; + ratebits = pkt->data[9] >> 4; else return AVERROR_INVALIDDATA; |