From: Joseph A. <jo...@mi...> - 2013-02-04 16:24:37
|
Hi, The current behaviour of lqt_decode_video() when encountering a broken frame is to log an error but then proceed to decoding the next frame, and then the next one, till it succeeds. At least ffmpeg plugin does it like that. That's obviously undesirable, as client code does not receive an error status and is additionally mislead about which frame it has just received. So, I made a patch that makes lqt_decode_video() return error on a broken frame, giving client code the opportunity to either abort or try to continue from the next frame by calling lqt_decode_video() again. While at it, I also documented the return value of lqt_decode_video(). The ugly thing is it contradicts the general convention in libquicktime of having 1 mean success and zero mean failure. I didn't dare to change every plugin to make it consistent with the rest of libquicktime, so I just documented that 0 means a success and non-zero means failure. I also fixed one instance of 0 being returned to indicate an error. -- Joseph Artsimovich Senior C++ Applications Developer MirriAd Ltd |