radek-k / FFMediaToolkit

FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
MIT License
353 stars 56 forks source link

Fix failure to decode on Mac OS X #16

Closed Claytonious closed 4 years ago

Claytonious commented 4 years ago

Without this change, attempting to call MediaFile.Video.ReadNextFrame() or ReadFrame(int) always resulted in an exception with error number -35 "The device is temporarily unavailable". Adding a check for this value to the while loop fixes it. I don't know what -35 means vs EAGAIN, but this change gets everything working on Mac.

Great library - thank you for publishing it!