Opened 9 years ago

#1840 new defect

validity check for stream_seek block Playing shoutcast stream

Reported by: kuh3h3@… Owned by: reimar
Priority: normal Component: streaming
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

reimar introduced new patch

Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h Sun Dec 12 11:37:15 2010 (r32701)
+++ trunk/stream/stream.h Sun Dec 12 12:45:47 2010 (r32702)
@@ -292,6 +292,10 @@ inline static int stream_seek(stream_t *

mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%qX\n",(long long)pos);

+ if (pos < 0) {
+ mp_msg(MSGT_DEMUX, MSGL_ERR, "Invalid seek to negative position!\n");
+ pos = 0;
+ }

if(pos<s->pos){

off_t x=pos-(s->pos-s-≥buf_len);
if(x>=0){

but this patch block Playing shoutcast stream.

$ mplayer http://yp.shoutcast.com/sbin/tunein-station.pls?id=192
MPlayer SVN-r32728-4.4.1 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing http://yp.shoutcast.com/sbin/tunein-station.pls?id=192.
Resolving yp.shoutcast.com for AF_INET...
Connecting to server yp.shoutcast.com[64.12.96.225]: 80...

Cache size set to 320 KBytes
Cache fill: 0.01% (39 bytes)

Invalid seek to negative position!

Exiting... (End of file)

Change History (0)

Note: See TracTickets for help on using tickets.