[MPlayer-dev-eng] [PATCH]demus_asf.c : ASF video not playing
alexis.deruelle
alexis.deruelle at laposte.net
Tue Jun 22 16:27:38 CEST 2004
There's a bug in libmpdemux/asf_demux.c that prevents some videos
(grabbed with my digital camera) from playing.
The packet pointer calculation at the begining of demux_asf_fill_buffer
is broken IMHO, the logic tries to adjust the pointer value with the
size of optional ECC info.
The simple patch below fixes it for me (against current CVS snapshot) :
--- demux_asf.c.orig 2004-06-22 15:54:32.160990833 +0200
+++ demux_asf.c 2004-06-22 16:08:26.311748475 +0200
@@ -153,7 +153,7 @@
if(demux->stream->eof) return 0; // EOF
{ unsigned char ecc_flags=asf_packet[0];
- unsigned char* p=&asf_packet[1+(ecc_flags&15)];
+ unsigned char* p=asf_packet;
unsigned char* p_end=asf_packet+asf_packetsize;
unsigned char flags=p[0];
unsigned char segtype=p[1];
If no ECC is present, there's no need to offset the ponter at all.
moreover the offset
What do you think ?
--
Alexis <alexis.deruelle at laposte.net>
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
More information about the MPlayer-dev-eng
mailing list