From 56bf07f685546641e9217443cef54b714f35da5c Mon Sep 17 00:00:00 2001 From: rtognimp Date: Thu, 3 Mar 2005 23:02:45 +0000 Subject: [PATCH] Fix very old ra files with no fourcc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14910 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_realaud.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmpdemux/demux_realaud.c b/libmpdemux/demux_realaud.c index c953729fab..cfb4ac5445 100644 --- a/libmpdemux/demux_realaud.c +++ b/libmpdemux/demux_realaud.c @@ -192,6 +192,7 @@ int demux_open_ra(demuxer_t* demuxer) } if (ra_priv->version == 3) { + if(ra_priv->hdr_size + 8 > stream_tell(demuxer->stream)) { stream_skip(demuxer->stream, 1); i = stream_read_char(demuxer->stream); sh->format = stream_read_dword_le(demuxer->stream); @@ -200,12 +201,14 @@ int demux_open_ra(demuxer_t* demuxer) "MPlayer developers\n", i); stream_skip(demuxer->stream, i - 4); } -// stream_skip(demuxer->stream, 3); if (sh->format != FOURCC_LPCJ) { mp_msg(MSGT_DEMUX,MSGL_WARN,"[RealAudio] Version 3 with FourCC %8x, please report to " "MPlayer developers\n", sh->format); } + } else + // If a stream does not have fourcc, let's assume it's 14.4 + sh->format = FOURCC_LPCJ; sh->channels = 1; sh->samplesize = 16;