On Sat, Jul 20, 2024 at 08:11:02AM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2024-07-20 02:08:28) > > On Wed, Jul 17, 2024 at 08:42:41AM +0200, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2024-07-15 16:48:25) > > [...] > > > > @@ -3155,8 +3156,11 @@ static int decode_slice(HEVCContext *s, const H2645NAL *nal, GetBitContext *gb) > > > > int ret; > > > > > > > > ret = hls_slice_header(&s->sh, s, gb); > > > > - if (ret < 0) > > > > + if (ret < 0) { > > > > + //The code is not capable to rewind from an error, the state now is inconsistant so we cannot use it on depandant slices > > > ^ ^ > > > e e > > > Also I'd drop everything before the comma, why mention rewinding that is > > > not implemented and may not be a good idea anyway. > > > > It seems we disagree on some things. > > A failing function should not corrupt the state. We also dont do that > > in other cases like SPS/PPS. > > This is also unexpected, so it should be documented. > > In my view, the root problem is not that the state is corrupted, but > that the independent slice segment is missing. No rewinding you can do > will conjure it out of nowhere, and it's not at all clear to me that > using some random previous slice segment's data is the right thing to > do. I think it is bad practice to leave inconsistant state and "Just not use it" because if something either now or in the future does end up using it, that could result in undeffined or unexpected behavior thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment.