[MPlayer-cvslog] r22005 - trunk/libmpdemux/demux_realaud.c
rtogni
subversion at mplayerhq.hu
Wed Jan 24 16:05:42 CET 2007
Author: rtogni
Date: Wed Jan 24 16:05:42 2007
New Revision: 22005
Modified:
trunk/libmpdemux/demux_realaud.c
Log:
Use interleaver id to select the correct interleaver instead of guessing
it from the codec id.
Fixes gittin_13.ra
Modified: trunk/libmpdemux/demux_realaud.c
==============================================================================
--- trunk/libmpdemux/demux_realaud.c (original)
+++ trunk/libmpdemux/demux_realaud.c Wed Jan 24 16:05:42 2007
@@ -22,6 +22,8 @@
#define FOURCC_DNET mmioFOURCC('d','n','e','t')
#define FOURCC_LPCJ mmioFOURCC('l','p','c','J')
#define FOURCC_SIPR mmioFOURCC('s','i','p','r')
+#define INTLID_INT4 mmioFOURCC('I','n','t','4')
+#define INTLID_SIPR mmioFOURCC('s','i','p','r')
static unsigned char sipr_swaps[38][2]={
@@ -46,7 +48,7 @@
unsigned short sub_packet_h;
unsigned short frame_size;
unsigned short sub_packet_size;
- char genr[4];
+ unsigned intl_id;
unsigned char *audio_buf;
} ra_priv_t;
@@ -84,8 +86,8 @@
len = wf->nBlockAlign;
demuxer->filepos = stream_tell(demuxer->stream);
- if ((sh->format == FOURCC_288) || (sh->format == FOURCC_SIPR)) {
- if (sh->format == FOURCC_SIPR) {
+ if ((ra_priv->intl_id == INTLID_INT4) || (ra_priv->intl_id == INTLID_SIPR)) {
+ if (ra_priv->intl_id == INTLID_SIPR) {
int n;
int bs = ra_priv->sub_packet_h * ra_priv->frame_size * 2 / 96; // nibbles per subpacket
stream_read(demuxer->stream, ra_priv->audio_buf, ra_priv->sub_packet_h * ra_priv->frame_size);
@@ -199,12 +201,9 @@
mp_msg(MSGT_DEMUX,MSGL_V,"[RealAudio] %d channel, %d bit, %dHz\n", sh->channels,
sh->samplesize, sh->samplerate);
i = stream_read_char(demuxer->stream);
- ra_priv->genr[0] = stream_read_char(demuxer->stream);
- ra_priv->genr[1] = stream_read_char(demuxer->stream);
- ra_priv->genr[2] = stream_read_char(demuxer->stream);
- ra_priv->genr[3] = stream_read_char(demuxer->stream);
+ ra_priv->intl_id = stream_read_dword_le(demuxer->stream);
if (i != 4) {
- mp_msg(MSGT_DEMUX,MSGL_WARN,"[RealAudio] Genr size is not 4 (%d), please report to "
+ mp_msg(MSGT_DEMUX,MSGL_WARN,"[RealAudio] Interleaver Id size is not 4 (%d), please report to "
"MPlayer developers\n", i);
stream_skip(demuxer->stream, i - 4);
}
More information about the MPlayer-cvslog
mailing list