[FFmpeg-soc] [soc]: r4960 - spdif/spdif.c
bwolowiec
subversion at mplayerhq.hu
Thu Aug 6 10:59:58 CEST 2009
Author: bwolowiec
Date: Thu Aug 6 10:59:57 2009
New Revision: 4960
Log:
Simplify pkt_offset calculation for MPEG
Modified:
spdif/spdif.c
Modified: spdif/spdif.c
==============================================================================
--- spdif/spdif.c Thu Aug 6 10:54:10 2009 (r4959)
+++ spdif/spdif.c Thu Aug 6 10:59:57 2009 (r4960)
@@ -117,8 +117,8 @@ static const uint8_t mpeg_data_type[2][3
static const uint16_t mpeg_pkt_offset[2][3] = {
//LAYER1 LAYER2 LAYER3
- { 768, 2304, 1152 }, // MPEG2 LSF
- { 384, 1152, 1152 }, // MPEG1
+ { 3072, 9216, 4608 }, // MPEG2 LSF
+ { 1536, 4608, 4608 }, // MPEG1
};
static int spdif_header_mpeg(AVFormatContext *s, AVPacket *pkt)
@@ -133,7 +133,7 @@ static int spdif_header_mpeg(AVFormatCon
}
av_log(s, AV_LOG_DEBUG, "lsf: %i layer: %i\n", lsf, layer);
ctx->data_type = mpeg_data_type[lsf][layer];
- ctx->pkt_offset = mpeg_pkt_offset[lsf][layer] << 2;
+ ctx->pkt_offset = mpeg_pkt_offset[lsf][layer];
// TODO Data type dependant info (normal/karaoke, dynamic range control)
return 0;
}
More information about the FFmpeg-soc
mailing list