]> git.sesse.net Git - ffmpeg/commit
avformat/matroskadec: Make reading zero-length elements spec-compliant
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 16 Feb 2021 15:51:40 +0000 (16:51 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 22 Feb 2021 02:57:52 +0000 (03:57 +0100)
commit0a99c3dadc3f9cef922c5c61a2ef4bc58af10a1a
tree5f7236409c05e81f6eb8d25ff3c5090ee636e44d
parent2f1a5621d319502fc8435a777d9628dec1958b3c
avformat/matroskadec: Make reading zero-length elements spec-compliant

For a very long time, the payload of integer and float elements had to
have a length > 0. Our parser treated such invalid elements as having a
value zero. But now it has been defined what an EBML element with length
zero means: It is a shorthand for the default value. This has also been
defined for strings (both ASCII and UTF-8). This commit modifies our
parser to support this.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskadec.c