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

BBC:
mms://a406.v39440a.c39440.e.vm.akamaistream.net/7/406/39440/200805211240/bbcworldservice.download.akamai.com/39440/worldservice/tx/nb/summary5min.wma

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

http://lcp.mud.us.music.yahoo.com/p.svt?action=get&u=807157506&sf=1&y=1355&d=807157506&p=1&m=7318647&g=0&c=3146753&ai=0&si=396500505&gsi=0&sk=A556F9E4AB3D2483b0fd3&ln=us&r=1&sg=1211830219&eg=iCUwj9_5dUBdZrUVXJky0A&n=30-1.asp

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.

-- 
bl4




More information about the vlc-devel mailing list