On Mon, Dec 09, 2019 at 12:52:45PM +0100, Andreas Rheinhardt wrote:
> On Mon, Dec 9, 2019 at 2:54 AM James Almer <jamr...@gmail.com> wrote:
> 
> > On 12/8/2019 6:31 PM, Michael Niedermayer wrote:
> > > This allows writing empty slices
> >
> > Are empty slices valid in mpeg2 to begin with? Or is that the result of
> > invalid/truncated data exclusively?
> >
> > It's invalid data, unless data partitioning (which we do not and IMO
> should never support) is in use. Data partitioning allows to split the
> bitstream into two that can be sent independently (and over channels of
> different reliability) and it allows the slice in the base layer to only
> contain everything excluding the macroblocks (i.e. everything that we put
> into the slice header).
> 
> But if data partitioning is not in use, there has to be a macroblock after
> the extra_information_slice and a macroblock consists of more than zero
> bits; in fact, there always has to be a bit set to 1 among the first eight
> bits (which is not meant to imply that every macroblock needs to contain
> eight bits at all).
> 
> I will add a check to error out if slices without data beyond the slice
> header are encountered upon reading. And also similar patches for cbs_h2645.

well, we can be more picky and error out yes.
Thats primarly a question what to do when the input isnt strictly valid, 
do we support maintaining all parts in their invalid form or do we do 
something else like droping parts that arent valid.

Thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to