Dash-Industry-Forum / MPEG-Conformance-and-reference-source

Contains several MPEG reference software modules. Not actively maintained. The ISOSegmentValidator is moved to - https://github.com/Dash-Industry-Forum/ISOSegmentValidator
21 stars 31 forks source link

Fixes for Windows build failures, and stack overwrite - see #39 and #41 #40

Closed andyburras closed 11 months ago

andyburras commented 6 years ago

Fix for stack overwrite - see https://github.com/Dash-Industry-Forum/Conformance-and-reference-source/issues/41


Fixes for Windows build failures - see https://github.com/Dash-Industry-Forum/Conformance-and-reference-source/issues/39

This should all be "transparent" changes. The code has been refactored to remove the dependency on g++ support for non-standard C++ features.

for (int j = i; list[j].offset < (offset + segmentSizes[index]); j++) { ... } errprint("[...]",index, list[j].offset);

Does not obey C++ standard rules - the scope of the name(s) declared extends to the end of the for statement. Change: Initialised 'j' prior to the loop.

char vsdi_name[strlen(vsdi.name)]; and saio_offset ...

Using non-standard C++ dynamic array length. Change: vsdi.name is a fixed length, so introduced a #define value. Change: Allocated 'saio_offset' using new.

true and false are #defined.

C++ Standard Library forbids macroizing keywords Change: Commented out the #define of true and false in ValidateMP4.h