--- ogmrip-0.13.3/libogmrip/ogmrip-version.c.skip-mplayer-version-check 2009-12-09 19:43:27.000000000 +0100 +++ ogmrip-0.13.3/libogmrip/ogmrip-version.c 2009-12-24 14:40:55.000000000 +0100 @@ -28,10 +28,10 @@ static gboolean have_mencoder = FALSE; static gboolean have_dts = FALSE; -static gint mplayer_major = 0; +static gint mplayer_major = 1; static gint mplayer_minor = 0; static gint mplayer_pre = 0; -static gint mplayer_rc = 0; +static gint mplayer_rc = 2; /** * ogmrip_check_mplayer: @@ -43,75 +43,7 @@ gboolean ogmrip_check_mplayer (void) { - static gboolean mplayer_checked = FALSE; - - if (!mplayer_checked) - { - GRegex *regex; - GMatchInfo *match_info; - gboolean match; - const gchar *version; - gchar *output; - - mplayer_checked = TRUE; - - version = g_getenv ("MPLAYER_VERSION"); - if (version) - output = g_strdup_printf ("MPlayer %s", version); - else - { - if (!g_spawn_command_line_sync ("mplayer", &output, NULL, NULL, NULL)) - return FALSE; - } - - have_mplayer = TRUE; - - regex = g_regex_new ("MPlayer (\\d+)\\.(\\d+)((rc|pre)(\\d+))?", 0, 0, NULL); - if (!regex) - { - g_free (output); - return FALSE; - } - - match = g_regex_match_full (regex, output, -1, 0, 0, &match_info, NULL); - if (match) - { - gchar *str, **vstr; - - while (g_match_info_matches (match_info)) - { - str = g_match_info_fetch (match_info, 0); - vstr = g_regex_split_full (regex, str, -1, 0, 0, -1, NULL); - g_free (str); - - if (vstr) - { - if (vstr[0] && vstr[1]) - { - mplayer_major = atoi (vstr[1]); - mplayer_minor = atoi (vstr[2]); - if (vstr[3] && vstr[4] && vstr[5]) - { - if (g_str_equal (vstr[4], "rc")) - mplayer_rc = atoi (vstr[5]); - else - mplayer_pre = atoi (vstr[5]); - } - } - g_strfreev (vstr); - } - - g_match_info_next (match_info, NULL); - } - - g_match_info_free (match_info); - } - - g_regex_unref (regex); - g_free (output); - } - - return have_mplayer; + return TRUE; } /**