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 276 - YUV overlay crash inside Quicktime on OS X 10.4 Intel
Summary: YUV overlay crash inside Quicktime on OS X 10.4 Intel
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS X 10.4 (Intel)
: P2 critical
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-10 19:10 UTC by Peter Mulholland
Modified: 2006-09-23 20:03 UTC (History)
0 users

See Also:


Attachments
Fix yuv crash for MacOS X intel (1.61 KB, patch)
2006-09-10 05:58 UTC, Jean-Charles BERTIN
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Mulholland 2006-07-10 19:10:33 UTC
While testing new SDL-1.2 SVN tree on OS X with dual binary (using the Fat build scripts), and SMPEG, the playsmpeg program causes a crash on Intel. Here is a gdb backtrace:

(gdb) bt
#0  0x98e55a22 in YUV420To2VUY_W1x ()
#1  0x98e38ca1 in FinalGlueBeforeTheBlit ()
#2  0x98e3d058 in PrepareForBlitThenDoBlit ()
#3  0x98e397e0 in ScalingCodecComponentDispatch ()
#4  0x90cc1508 in CallComponentDispatch ()
#5  0x995f414b in ImageCodecDrawBand ()
#6  0x98cae985 in BaseCodec_DecompressWorkFunction ()
#7  0x90ccd62b in InvokeComponentMPWorkFunctionUPP ()
#8  0x98caca2b in BaseCodec_DecompressCallBack_Common ()
#9  0x98cb073f in Base_CDBandDecompress ()
#10 0x90cc1823 in CallComponentFunctionCommon ()
#11 0x98cab3c1 in Base_CDComponentDispatch ()
#12 0x98e38f4b in ScalingCodecComponentDispatch ()
#13 0x98e4c1d8 in YUV420CodecComponentDispatch ()
#14 0x90cc1508 in CallComponentDispatch ()
#15 0x94479667 in ImageCodecBandDecompress ()
#16 0x94467ff9 in DoBandedDecompress ()
#17 0x94464083 in ICMAction ()
#18 0x94462d9b in ICMDeviceLoop ()
#19 0x9446bee0 in DecompressSequenceFrameWhen ()
#20 0x944a3348 in DecompressSequenceFrameS ()
#21 0x003237c4 in QZ_DisplayYUV (this=0x1825c00, overlay=0x56a700, src=0xb0220cc8, dst=0xb0220cc0) at ../../src/video/quartz/SDL_QuartzYUV.m:77
#22 0x00319fa1 in SDL_DisplayYUVOverlay (overlay=0x56a700, dstrect=0x182524c) at ../../src/video/SDL_yuv.c:126
#23 0x00223e04 in MPEGvideo::DisplayFrame (this=0x1825000, vid_stream=0x184e000) at video/gdith.cpp:358
#24 0x00224360 in MPEGvideo::ExecuteDisplay (this=0x1825000, vid_stream=0x184e000) at video/gdith.cpp:399
#25 0x00229c4e in DoPictureDisplay (vid_stream=0x2cf6d200) at video/video.cpp:4673
#26 0x00231fe2 in mpegVidRsrc (time_stamp=0, vid_stream=0x184e000, first=0) at video/video.cpp:1314
#27 0x002222a4 in Play_MPEGvideo (udata=0x1825000) at video/MPEGvideo.cpp:254
#28 0x002f51d5 in SDL_RunThread (data=0x56af50) at ../../src/thread/SDL_thread.c:202
#29 0x00324062 in RunThread (data=0x56af50) at ../../src/thread/pthread/SDL_systhread.c:47
#30 0x90024b07 in _pthread_body ()

A similar crash also occurs in testoverlay.c

When I run a PowerPC playsmpeg (by using lipo to strip out the ppc only executable), it works just fine, so I'm not sure if this is really Apple's fault and there is something broken in Quicktime, or if something is broken in SDL.
Comment 1 Bill 2006-08-07 02:22:10 UTC
I'd like to say I have this bug too, same symptom, same crash point, macbook pro, on first SDL_DisplayYUVOverlay with a YV12 overlay. Will try it on ppc next.
Comment 2 Jean-Charles BERTIN 2006-09-10 05:58:18 UTC
Created attachment 164 [details]
Fix yuv crash for MacOS X intel

The bug is in src/video/quartz/SDL_QuartzYUV.m. The PlanarPixmapInfoYUV420 *MUST* be a big-endian struct. (See ImageCompression.h, kYUV420PixelFormat constant definition). I post a patch against SDL 1.2.9.
Comment 3 Sam Lantinga 2006-09-23 20:03:38 UTC
This fix is in subversion, thanks!