OpenImageIO: [BUG] reading .mp4 files results in crash
Describe the bug So, i don’t really know what happens. If I’m executing the oiiotool to just read an video file (mp4), it creates the temporary destination file and then exits without any error. I can play the video via ffplay without problems.
If I’m running oiio with in my own program, it will open the video file and read the metainfo like size etc. But as soon as I call the read_image function, it will crash without an error like the oiiotool. While debugging, i’ve noticed that it will crash at the function FFmpegInput::read_native_callback. The debugger stops at the line of the return. So I guess that it will be some problem at the memcpy call.
Unfortunately I’ll get no error or some other crash report. Just the exit of the whole program.
To Reproduce
Build with vcpkg with openimageio[ffmpeg,tools]
Expected behavior I would expect, that the video file would be read into the data array
Platform information:
- build with vcpkg and
- OIIO branch/version: 2.1.18.1 (also with vcpkg current version 2.1.16.0)
- OS: Windows 10.0.19041 x64
- C++ compiler: MSCV v16.7.1
- Any non-default build flags when you build OIIO: no
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 18 (7 by maintainers)
Commits related to this issue
- ffmpeg: prefer O(N) march to O(1) broken seek #2688 — committed to dankamongmen/oiio by dankamongmen 4 years ago
- ffmpeg: prefer O(N) march to O(1) broken seek #2688 — committed to dankamongmen/oiio by dankamongmen 4 years ago
- ffmpeg: prefer O(N) march to O(1) broken seek #2688 — committed to dankamongmen/oiio by dankamongmen 4 years ago
I can reproduce with this example!
That’s very good news, it means there’s something about this file that is triggering a bug. And it’s not Windows specific.