Jump to content

Adding a patch


Recommended Posts

The following is a patch for mplayer plugin 3.21, I want to add it to 3.31, how do I read this so I can manually add it, or how would I even go about adding the patch to 3.21

 

 --- plugin.cpp  2006-02-10 07:40:31.000000000 +0900
+++ plugin.cpp.new	  2006-08-15 16:15:50.000000000 +0900
@@ -233,6 +233,7 @@
 hidestatus = 0;

#ifdef GTK_ENABLED
+	gtk_init(NULL, NULL);	  // FIXME
 image = NULL;
 progress_bar = NULL;
 mediaprogress_bar = NULL;
@@ -1144,6 +1145,7 @@
		window_width = aWindow->width;
		window_height = aWindow->height;
	}
+	   gtk_main();	 // FIXME
 }

 if (DEBUG)

Edited by ffi
Link to comment
Share on other sites

Usually a patch is made with the diff command and applied with the patch command. However if the patch is built from 3.21 then chances are you won't be able to apply it straight off to 3.31 because the lines won't match up any more (probably).

From the looks of it, there are only two lines added by this patch (the two "FIXME" lines), so if you wanted to apply it manually then just search through your copy of the file (plugin.cpp) for the two appropriate points, and add in those two lines where they appear in the patch. Approximate line numbers to look for are 233 and 1144.

 

Be aware though, both these added lines are marked with "FIXME" so they're probably only a temporary hack to get things to work, with a note that they should be properly fixed at some future date. And there's no guarantee that the other changes made between 3.21 and 3.31 conflict with what this patch is trying to achieve anyway.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...