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

bl4 bl4 at playker.info
Mon May 26 22:28:17 CEST 2008

Rafaël Carré wrote:
> 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 ?


For Launchcast, it would be difficult because these links expire 
quickly. Try this url:


If you get this url and get the url it points to, you will have a 
working mms link. (By the way, I made a patch for vlc that implements 
support for these weird wmp redirections. Maybe I'll send it later but I 
don't know if it's worth it.)

> 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 ?

Actually, in my tests this function never gets to this point. It seemed 
a good idea before I made the other change to this file to prevent 
seeking. And I forgot to test this change later.

Perhaps you're right about the return value, so I suggest applying 
without this part.


More information about the vlc-devel mailing list