summaryrefslogtreecommitdiffstats
path: root/libmpdemux/stream.c
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-02-17 12:30:45 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-02-17 12:30:45 +0000
commitb603289132cbe36dc57ab9f284742f5b47e6818e (patch)
treeaf802179660474434ab46bab525d70aec037987d /libmpdemux/stream.c
parentdd4befd76fd2e8a4c30681f8dae17186065cc8c8 (diff)
downloadmpv-b603289132cbe36dc57ab9f284742f5b47e6818e.tar.bz2
mpv-b603289132cbe36dc57ab9f284742f5b47e6818e.tar.xz
enable seeking in http streams
patch by Valentine Zaretsky <valik+mplayerdev@email.dp.ua> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11966 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/stream.c')
-rw-r--r--libmpdemux/stream.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c
index 840d70badf..96e8bc1122 100644
--- a/libmpdemux/stream.c
+++ b/libmpdemux/stream.c
@@ -314,6 +314,14 @@ if(newpos==0 || newpos!=s->pos){
// A function call that return -1 can tell that the protocol
// doesn't support seeking.
#ifdef MPLAYER_NETWORK
+ if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one
+ if(!s->seek(s,newpos)) {
+ mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n");
+ return 1;
+ }
+ break;
+ }
+
if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_seek ) {
if( s->streaming_ctrl->streaming_seek( s->fd, pos, s->streaming_ctrl )<0 ) {
mp_msg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n");