matroskadec: Add sizes to forward declarations

Multimedia / FFmpeg - Andreas Rheinhardt [] - 18 July 2019 07:38 EDT

Unknown-length elements end when an element not allowed in them, but allowed at a higher level is encountered. In order to check for this, c1abd95a added a pointer to every syntax level's parent to each EbmlSyntax. Given that the parent must of course also reference the child in order to be able to enter said child level, one needs to use forward declarations. These forward declarations constitute tentative definitions and tentative definitions with internal linkage (like our syntaxes) must not be an incomplete type. Yet they were an incomplete type and while GCC and Clang did not even warn about this (on default warning levels), it broke compilation with MSVC. Therefore this commit adds the sizes.

ab4795a085 matroskadec: Add sizes to forward declarations
libavformat/matroskadec.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

  • Share