mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
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.
This commit is contained in:
parent
36e156bef0
commit
56df8296f5
@ -435,9 +435,9 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (AV_RB24(pkt->data + 4) == 0xf8726f) {
|
if (AV_RB24(pkt->data + 4) == 0xf8726f) {
|
||||||
/* major sync unit, fetch sample rate */
|
/* major sync unit, fetch sample rate */
|
||||||
if (pkt->data[7] == 0xba)
|
if (pkt->data[7] == 0xba)
|
||||||
ratebits = pkt->data[8] >> 8;
|
ratebits = pkt->data[8] >> 4;
|
||||||
else if (pkt->data[7] == 0xbb)
|
else if (pkt->data[7] == 0xbb)
|
||||||
ratebits = pkt->data[9] >> 8;
|
ratebits = pkt->data[9] >> 4;
|
||||||
else
|
else
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user