[MPlayer-dev-eng] RealMedia playing broken with demux_real.c 1.58

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sat May 1 01:18:13 CEST 2004


On Friday, 30 April 2004 at 23:58, Roberto Togni wrote:
> On 2004.04.30 23:18, Dominik 'Rathann' Mierzejewski wrote:
> > Hi.
> > 
> > The CVS change below breaks plaing all RealMedia files I have.
> > Reversing
> > it fixes the problem. Interestingly, all these files have hdr_size
> > less
> > than 0x4e, so stream_skip is actually called with negative argument
> > (-8
> > for example), which results in sig11.
> > 
> > @@ -1190,6 +1193,10 @@
> >                    sh->wf->cbSize = 0;
> >                    sh->format = MKTAG(buf[0], buf[1], buf[2],
> > buf[3]);
> > 
> > +                   if ((version != 3) && (hdr_size != 0x4e)) {
> > +                       mp_msg(MSGT_DEMUX,MSGL_V,"skipping %d extra
> > header bytes\n", hdr_size-0x4e);
> > +                       stream_skip(demuxer->stream, hdr_size-0x4e);
> > +                   }
> > #if 0
> >                    switch (sh->format){
> > 			case MKTAG('d', 'n', 'e', 't'):
> > 
> > Shall I provide more info?
> Yes, thanks. I think i understood the problem, but i'd loke to test it
> before doing any change.
> Is some sample available somewhere (i'll test with all my samples
> anyway)? If not, can you post some info about codec used and mplyer
> output information about demuxer (file version and such)?

Here's a gdb session:
(gdb) run -v Legend-of-the-Rangers_I.rm 
Starting program: /usr/local/share/builder/pkg/BUILD/MPlayer-1.0pre4/mplayer -v Legend-of-the-Rangers_I.rm
[New Thread 1024 (LWP 28889)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale

MPlayer 1.0pre4-RPM-3.2.2 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon Thunderbird 1007 MHz (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx

Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/dominik/.mplayer/config
Reading /home/dominik/.mplayer/codecs.conf: Can't open '/home/dominik/.mplayer/codecs.conf': Nie ma takiego pliku ani katalogu
Reading /etc/mplayer/codecs.conf: 66 audio & 176 video codecs
CommandLine: '-v' 'Legend-of-the-Rangers_I.rm'
init_freetype
get_path('font/font.desc') -> '/home/dominik/.mplayer/font/font.desc'
font: can't open file: /home/dominik/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Failed to open /dev/rtc: Urządzenie lub zasoby są zajęte (/dev/rtc should be readable by the user.)
Using usleep() timing
get_path('input.conf') -> '/home/dominik/.mplayer/input.conf'
Can't open input config file /home/dominik/.mplayer/input.conf: Nie ma takiego pliku ani katalogu
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed: 53 binds
get_path('Legend-of-the-Rangers_I.rm.conf') -> '/home/dominik/.mplayer/Legend-of-the-Rangers_I.rm.conf'

Playing Legend-of-the-Rangers_I.rm.
[file] File size is 2087654 bytes
STREAM: [file] Legend-of-the-Rangers_I.rm
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0  pre:1677721  eof:0  
Cache fill:  0,68% (57344 bytes)    Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x85ad5d8  
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x85ad5d8  
Checking for Nullsoft Streaming Video
DEMUXER: freeing demuxer at 0x85ad5d8  
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x85ad5d8  
Checking for REAL
REAL file format detected.
real: Header size: 18
real: Header object version: 0
real: File version: 0
Chunk: PROP (504f5250) (size: 0x32, offset: 0x12)
First index chunk offset: 0x1fd316
First data chunk offset: 0x19a
Chunk: CONT (544e4f43) (size: 0x38, offset: 0x44)
Chunk: MDPR (5250444d) (size: 0xa4, offset: 0x7c)
Found new stream (id: 0)
skip_str: 12 bytes skipped
skip_str: 20 bytes skipped
==> Found audio stream: 0
Found audio stream!
version: 5
header size: 70
frame_size: 640
sub_packet_size: 128
samplerate: 44100, channels: 1
skipping -8 extra header bytes

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 28889)]
0x42082a1c in memcpy () from /lib/i686/libc.so.6
(gdb) bt
#0  0x42082a1c in memcpy () from /lib/i686/libc.so.6
#1  0x08163adb in demux_open_real (demuxer=0x85ac3e0) at stream.h:201
#2  0x0814b683 in demux_open_stream (stream=0x85ac3e0, file_format=11, audio_id=-1, video_id=-1, 
    dvdsub_id=-1, filename=0x85771b8 "Legend-of-the-Rangers_I.rm") at demuxer.c:1252
#3  0x0814cf60 in demux_open (vs=0x85ac3e0, file_format=0, audio_id=-1, video_id=140166112, 
    dvdsub_id=-1, filename=0x85ac3e0 "") at demuxer.c:1405
#4  0x08071125 in main (argc=3, argv=0xbffff834) at mplayer.c:1378
#5  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) disassemble $pc-32 $pc+32
Dump of assembler code from 0x420829fc to 0x42082a3c:
0x420829fc <memccpy+76>:	add    %al,(%eax)
0x420829fe <memccpy+78>:	add    %al,(%eax)
0x42082a00 <memcpy>:	mov    0xc(%esp,1),%ecx
0x42082a04 <memcpy+4>:	mov    %edi,%eax
0x42082a06 <memcpy+6>:	mov    0x4(%esp,1),%edi
0x42082a0a <memcpy+10>:	mov    %esi,%edx
0x42082a0c <memcpy+12>:	mov    0x8(%esp,1),%esi
0x42082a10 <memcpy+16>:	cld    
0x42082a11 <memcpy+17>:	shr    %ecx
0x42082a13 <memcpy+19>:	jae    0x42082a16 <memcpy+22>
0x42082a15 <memcpy+21>:	movsb  %ds:(%esi),%es:(%edi)
0x42082a16 <memcpy+22>:	shr    %ecx
0x42082a18 <memcpy+24>:	jae    0x42082a1c <memcpy+28>
0x42082a1a <memcpy+26>:	movsw  %ds:(%esi),%es:(%edi)
0x42082a1c <memcpy+28>:	repz movsl %ds:(%esi),%es:(%edi)
0x42082a1e <memcpy+30>:	mov    %eax,%edi
0x42082a20 <memcpy+32>:	mov    %edx,%esi
0x42082a22 <memcpy+34>:	mov    0x4(%esp,1),%eax
0x42082a26 <memcpy+38>:	ret    
0x42082a27 <memcpy+39>:	mov    %esi,%esi
0x42082a29 <memcpy+41>:	lea    0x0(%edi,1),%edi
0x42082a30 <memcpy+48>:	mov    (%esp,1),%ebx
0x42082a33 <memcpy+51>:	ret    
0x42082a34 <_wordcopy_fwd_aligned>:	push   %ebp
0x42082a35 <_wordcopy_fwd_aligned+1>:	mov    %esp,%ebp
0x42082a37 <_wordcopy_fwd_aligned+3>:	push   %edi
0x42082a38 <_wordcopy_fwd_aligned+4>:	push   %esi
0x42082a39 <_wordcopy_fwd_aligned+5>:	push   %ebx
0x42082a3a <_wordcopy_fwd_aligned+6>:	call   0x42082a30 <memcpy+48>
End of assembler dump.

> If you change it to (hdr_size > 0x4e), does it fix your problem?

Yes, it does.

Thanks,
Dominik

-- 
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/mplayer.html
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"




More information about the MPlayer-dev-eng mailing list