[MPlayer-dev-eng] [PATCH] make rm demuxer skip too short packages
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Nov 4 15:19:09 CET 2007
Hello,
this is a hack for bug #930
(rtsp://real.zmml.uni-bremen.de/lecture/extern/nachh/003.rm not
working).
The problem is that there is a very short packet that MPlayer interprets
as audio and overreads, and thus getting completely confused.
Attached patch "fixes" it the lazy way by ignoring audio packets smaller
than 256 bytes.
This probably only avoids the problem though: firstly I think the packet in
question actually belongs to an extra data stream and not the audio
stream.
Secondly the code that gives the audio packets some special treatment
ideally should be fixed to always read exactly the size of the packet, not more
or less.
Comments?
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpdemux/demux_real.c
===================================================================
--- libmpdemux/demux_real.c (revision 24859)
+++ libmpdemux/demux_real.c (working copy)
@@ -685,6 +686,10 @@
free(sub_packet_lengths);
return 1;
}
+if (len < 256) {
+ stream_skip(demuxer->stream, len);
+ continue;
+}
if ((priv->intl_id[stream_id] == mmioFOURCC('I', 'n', 't', '4')) ||
(priv->intl_id[stream_id] == mmioFOURCC('g', 'e', 'n', 'r')) ||
(priv->intl_id[stream_id] == mmioFOURCC('s', 'i', 'p', 'r'))) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071104/2c9bd446/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list