We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 165 - QZ_DisplayYUV has wrong return value code
Summary: QZ_DisplayYUV has wrong return value code
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS X (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-14 21:06 UTC by Rob Arnold
Modified: 2006-03-15 00:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Arnold 2006-03-14 21:06:07 UTC
SDL_DisplayYUVOverlay() is defined to return 0 on success.
The Quartz function QZ_DisplayYUV (which SDL_DisplayYUVOverlay() maps to for me) on the other hand calls the external apple func DecompressSequenceFramesS() which also returns 0, aka noErr, on success.  It's return value is assigned to err.

Then, for no reason I can fathon, QZ_DisplayYUV() returns with this line:
return err == noErr;

So, if everything went right, err will be 0, which is also what noErr is defined to be, so if everything goes successfully, you'll return 1, not 0.  I believe the last return statement should simply be:  return err;

I'm not clear on how this has not been caught already, so I'm wondering if I've missed something, but it looks like this is in CVS head, and has been in every past version I've bothered to look at.
Comment 1 Ryan C. Gordon 2006-03-15 00:52:44 UTC
Fixed in CVS, thanks!

--ryan.