Same logic as used for Webm and Theora support in #19937 and #21084, fixing issues when exporting projects.
Fixes warnings and a crash when running the destructor with an uninitialized pcm pointer.
Interface and callback api added for Videodecoder support. Should be able to construct any format videodecoder using only the given interface. GSoC 2018 project.