kidrigger / godot-videodecoder

GDNative Video Decoder libraries for Godot Game Engine, using FFmpeg library for codecs. A Google Summer of Code Project, 2018
MIT License
84 stars 22 forks source link

godot_videodecoder_open_file is modifying input_format struct owned by system. #47

Open ecurtz opened 1 year ago

ecurtz commented 1 year ago

Although technically it isn't const this is causing a crash on OS X and is probably a bad idea in general. Also the pointer doesn't appear to actually be used after the flags are modified, so it's probably safe to not do this?

https://github.com/kidrigger/godot-videodecoder/blob/af71383dce66eea88f3ce99b416613b925be3ba0/src/gdnative_videodecoder.c#L552

jamie-pate commented 1 year ago

I agree that overriding the output of probe is probably a mistake.