On Mon, Dec 9, 2019 at 2:54 AM James Almer <[email protected]> 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. - Andreas _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
