[vlc-devel] [PATCH] mms/tcp: hanging or unexpected seeking after the end of stream

Rafaël Carré funman at videolan.org
Mon May 26 10:42:48 CEST 2008


2008/5/24 bl4 <bl4 at playker.info>:
> This patch fixes issues with ending MMS/TCP playback: hanging, insisting on
> reading more data from the server or unexpected seeking to the middle of the
> file. It's very annoying when there are more items on the playlist.
>
> I tested it on http://music.yahoo.com/launchcast (Yahoo Launchcast) and
> http://www.bbc.co.uk/radio (BBC World News Bulletin). Here's some of the vlc
> output for Launchcast (with my comments):

Could you give me a direct mms link please ?

Your patch looks OK to me, except this part:

@@ -1070,7 +1075,7 @@ static int AStreamReadStream( stream_t *s, void
*p_read, int i_read )
             if( AStreamRefillStream( s ) )
             {
                 /* EOF */
-                if( tk->i_start >= tk->i_end ) break;
+                if( tk->i_start >= tk->i_end ) return 0;
             }
         }
     }

If we break; we will return the amount of data read, it's still
possible to read some data, reach the EOF, but then we want to use
what we just read.

Is that a left over of your debugging, or is it needed for another purpose ?

(Note I didn't try to execute the patch yet)

-- 
Rafaël Carré


More information about the vlc-devel mailing list