[vlc-devel] [PATCH 1/2] httplive: fix Read func. (when caller skips data)

Frederic YHUEL fyhuel at viotech.net
Thu Jan 12 15:48:22 CET 2012


On Tue, Jan 10, 2012 at 3:28 PM, Frederic YHUEL <fyhuel at viotech.net> wrote:
> On Tue, Jan 10, 2012 at 2:17 PM, Frederic YHUEL <fyhuel at viotech.net> wrote:
>> On Tue, Jan 10, 2012 at 11:02 AM, Jean-Paul Saman <jpsaman at videolan.org> wrote:
>>> I stand with my earlier conclusion the patch is wrong.
>>>
>>
>> Ok, if you say so... You're probably right.
>>
>> But (you might think I'm a pain in the neck) you didn't answer to the
>> question below:
>>
>>>>>
>>>>> I mean, what's the point to allocate a buffer and memcpy data in it,
>>>>> if the caller just wants to skips that data?
>>>>>
>
> Here is a patch that modify slightly the TS demuxer so that one over
> 0xffff TS packet is skipped.
>
> Then you can see that my patch is fine.
>
> Maybe there is a simpler way to test it though :-)
>

Ping?

Hey, you just have to apply the two patches and run VLC with HLS. TS
demux will call stream_Read() with a NULL argument (as if a
desynchronization occured), and you'll see that everything is fine.

When the caller wants to skip data, and therefore call stream_Read()
with a NULL argument, there's no point to allocate a buffer, put data
in it...

Rémi did that in decomp.c, but there it makes sense, because Read()
calls Peek(), so...

In HLS it makes no sense.

--
Frédéric



More information about the vlc-devel mailing list