[vlc-devel] [PATCH 1/4] mkv/demux: fix 17567: null-pointer dereference in EnsureDuration

Steve Lhomme robux4 at gmail.com
Wed Nov 2 09:50:46 CET 2016

On Wed, Nov 2, 2016 at 9:41 AM, Filip Roséen <filip at atch.se> wrote:
> Hi again,
> On 2016-11-02 09:22, Steve Lhomme wrote:
>  No, a Cluster is not mandatory (I double checked the specs). There can
>  be Matroska with just chapters and tags.
> In order for us to actually play something, it is; and in order for
> EnsureDuration to do what it is supposed to do - it definitely is (given how
> the function is implemented).
>  IMO EnsureDuration() has nothing to do with the fact that the current
>  Cluster has no finite size. "Infinite" Clusters still have boundaries,
>  and end and timestamps for each Cluster/Block.
> It does, see f275663. By definition, if a cluster is infinite there’s
> nothing saying that we will ever get to the end, so I do not see how the
> current implementation of EnsureDuration applies in such case (given that it
> will read blocks until the very end in order to know where the end actually
> is).

If the source is not being update/appended while reading (a finite
size file) then you know where the end is and you can fully parse the
file. That has nothing to do with the fact the muxer didn't know the
end when it wrote the data. So far we rely on STREAM_CAN_FASTSEEK in
EnsureDuration to tell in which case we are. It may not be perfect but
that's closer to not parsing the duration for a fully written file.

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list