comparison libmpdemux/demux_realaud.c @ 14908:82344f91104a

Fix some 28.8 ra files with four text strings
author rtognimp
date Thu, 03 Mar 2005 21:13:30 +0000
parents 00744f154e9c
children aa6715eaa28c
comparison
equal deleted inserted replaced
14907:11fc3e2ccecf 14908:82344f91104a
1 /* 1 /*
2 Realaudio demuxer for MPlayer 2 Realaudio demuxer for MPlayer
3 (c) 2003 Roberto Togni 3 (c) 2003, 2005 Roberto Togni
4 */ 4 */
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <unistd.h> 8 #include <unistd.h>
181 buf[i] = 0; 181 buf[i] = 0;
182 demux_info_add(demuxer, "Copyright", buf); 182 demux_info_add(demuxer, "Copyright", buf);
183 free(buf); 183 free(buf);
184 } 184 }
185 185
186 if ((i = stream_read_char(demuxer->stream)) != 0) 186 if ((i = stream_read_char(demuxer->stream)) != 0) {
187 mp_msg(MSGT_DEMUX,MSGL_WARN,"[RealAudio] Last header byte is not zero!\n"); 187 buf = malloc(i+1);
188 stream_read(demuxer->stream, buf, i);
189 buf[i] = 0;
190 demux_info_add(demuxer, "Comment", buf);
191 free(buf);
192 }
188 193
189 if (ra_priv->version == 3) { 194 if (ra_priv->version == 3) {
190 stream_skip(demuxer->stream, 1); 195 stream_skip(demuxer->stream, 1);
191 i = stream_read_char(demuxer->stream); 196 i = stream_read_char(demuxer->stream);
192 sh->format = stream_read_dword_le(demuxer->stream); 197 sh->format = stream_read_dword_le(demuxer->stream);