summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-09-08 18:04:11 +0000
committersr55 <[email protected]>2012-09-08 18:04:11 +0000
commitc85b8f5df78f90b0e4f4b5f9295bce48e3c9703b (patch)
tree9509427bad755f17415e901a743ab1ee8784fffe
parent0db4fa3ac171c254a8611a9de1eba93e91346388 (diff)
A patch for mpeg2 SetWindowLong() and GWL_USERDATA do not exist in recent versions of mingw-w64. Since we don't output to the display anyway, I've just disabled the code so things build.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4940 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/mpeg2dec/A02-gwluserdata.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/contrib/mpeg2dec/A02-gwluserdata.patch b/contrib/mpeg2dec/A02-gwluserdata.patch
new file mode 100644
index 000000000..fdd1fc1d3
--- /dev/null
+++ b/contrib/mpeg2dec/A02-gwluserdata.patch
@@ -0,0 +1,39 @@
+diff -ru mpeg2dec.orig/libvo/video_out_dx.c mpeg2dec/libvo/video_out_dx.c
+--- mpeg2dec.orig/libvo/video_out_dx.c 2008-07-09 11:28:24.000000000 -0700
++++ mpeg2dec/libvo/video_out_dx.c 2012-09-08 05:31:39.304849824 -0700
+@@ -92,9 +92,9 @@
+ switch (message) {
+
+ case WM_WINDOWPOSCHANGED:
+- instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA);
++ /*instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA);
+
+- /* update the window position and size */
++ // update the window position and size
+ point_window.x = 0;
+ point_window.y = 0;
+ ClientToScreen (hwnd, &point_window);
+@@ -104,9 +104,9 @@
+ instance->window_coords.right = rect_window.right + point_window.x;
+ instance->window_coords.bottom = rect_window.bottom + point_window.y;
+
+- /* update the overlay */
++ // update the overlay
+ if (instance->overlay && instance->display)
+- update_overlay (instance);
++ update_overlay (instance);*/
+
+ return 0;
+
+@@ -173,7 +173,10 @@
+ /* store a directx_instance pointer into the window local storage
+ * (for later use in event_handler).
+ * We need to use SetWindowLongPtr when it is available in mingw */
+- SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
++
++ // Current version of MINGW-W64 does not have this!
++ // Since we are not outputting to a display, this is not a problem.
++ //SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
+
+ ShowWindow (instance->window, SW_SHOW);
+ \ No newline at end of file