[FFmpeg-devel] [PATCH 08/10] spdifenc: fix incorrect bitstream mode for AC-3

Anssi Hannula anssi.hannula
Wed Dec 29 06:06:41 CET 2010


Noticed by CrystalP from XBMC.
---
 libavformat/spdifenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index b41e246..d7a42fc 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -97,7 +97,7 @@ static const AVClass class = { "spdif", av_default_item_name, options, LIBAVUTIL
 static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
 {
     IEC61937Context *ctx = s->priv_data;
-    int bitstream_mode = pkt->data[6] & 0x7;
+    int bitstream_mode = pkt->data[5] & 0x7;
 
     ctx->data_type  = IEC61937_AC3 | (bitstream_mode << 8);
     ctx->pkt_offset = AC3_FRAME_SIZE << 2;
-- 
1.7.3




More information about the ffmpeg-devel mailing list