diff --git a/libmpdemux/demux_realaud.c b/libmpdemux/demux_realaud.c index 630519990e..363262d7ae 100644 --- a/libmpdemux/demux_realaud.c +++ b/libmpdemux/demux_realaud.c @@ -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 @@ typedef struct { 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 @@ static int demux_ra_fill_buffer(demuxer_t *demuxer, demux_stream_t *dsds) 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 @@ static demuxer_t* demux_open_ra(demuxer_t* demuxer) 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); }