[vlc-devel] [PATCH] Add Smooth Streaming module

Frederic YHUEL fyhuel at viotech.net
Tue Apr 24 19:43:07 CEST 2012


On Tue, Apr 24, 2012 at 6:43 PM, Tobias Güntner <fatbull at web.de> wrote:
> Hello!
>
> Am 24.04.2012 15:35, schrieb Frederic YHUEL:
>
>>>>> +    if( strstr( (const char*)peek, needle ) != NULL )
>>>
>>>
>>> What if peek contains no '\0' and the needle is not in there?
>>>
>>
>> Then it returns false... am I missing something?
>
>
> strstr will dutifully continue past the end of the buffer until it finds the
> needle or a terminating '\0' or causes a segfault.
>

Ah yes obviously... thanks (and thanks Aurélien)

Seems like I'm tired today :-)

>
>>>>> +        conv_peek = FromCharset( "UTF-16", peek, 1024 );
>>>
>>>
>>> Little or big endian?
>>>
>>
>> What should I do?
>
>
> I think you should look for a Byte Order Mark and use UTF-16LE or UTF-16BE
> instead if you find one. Like stream_ReadLine.
>

Got it, thanks!

>
>>> Correct me if I'm wrong, but doesn't VLC cache 1000ms worth of data
>>> before starting playback, assuming the default network-caching setting?
>>
>>
>> What does mean 1000ms worth of data?
>
>
> Well ... What I tried to say: If I understand correctly, VLC buffers a
> stream until it has enough data for a few 100 ms of playback.

But what we are talking about happens *before* VLC is even able to
desire 100 ms of data.

I hope Laurent will have time to answer more cleverly than I did, though :-)

-- 
Frédéric



More information about the vlc-devel mailing list