[prev in list] [next in list] [prev in thread] [next in thread]
List: mplayer-dev-eng
Subject: Re: [MPlayer-dev-eng] load_per_xxx_config() issue
From: Ingo Brückl <ib () wupperonline ! de>
Date: 2011-09-30 15:50:16
Message-ID: 4e85e594.48c8acc9.bm000 () wupperonline ! de
[Download RAW message or body]
I wrote on Thu, 29 Sep 2011 01:25:13 +0200:
> Is this considered to be ok or a bug?
> $ mplayer test.mp3
> MPlayer SVN-r34149-4.3.4 (C) 2000-2011 MPlayer Team
> Loading extension-related profile 'extension.mp3'
> Playing test.mp3.
> Extension-related profile is loaded.
> $ mplayer -slave -idle
> MPlayer SVN-r34149-4.3.4 (C) 2000-2011 MPlayer Team
> load test.mp3
> Playing test.mp3.
> Extension-related profile isn't loaded.
Well, if not ok, this patch could fix it.
Ingo
["=?ISO-8859-1?Q?profile=5Fconfig.patch?=" (text/x-diff)]
Index: mplayer.c
===================================================================
--- mplayer.c (revision 34165)
+++ mplayer.c (working copy)
@@ -990,6 +990,17 @@
}
}
+static int load_profile_config(m_config_t *conf, const char *const file)
+{
+ if (file) {
+ load_per_protocol_config(conf, file);
+ load_per_extension_config(conf, file);
+ load_per_file_config(conf, file);
+ }
+
+ return (file != NULL);
+}
+
/* When libmpdemux performs a blocking operation (network connection or
* cache filling) if the operation fails we use this function to check
* if it was interrupted by the user.
@@ -2719,6 +2730,7 @@
int main(int argc, char *argv[])
{
int opt_exit = 0; // Flag indicating whether MPlayer should exit without playing anything.
+ int profile_config_loaded;
int i;
common_preinit();
@@ -3016,11 +3028,7 @@
mpctx->global_sub_size = 0;
memset(mpctx->sub_counts, 0, sizeof(mpctx->sub_counts));
- if (filename) {
- load_per_protocol_config(mconfig, filename);
- load_per_extension_config(mconfig, filename);
- load_per_file_config(mconfig, filename);
- }
+ profile_config_loaded = load_profile_config(mconfig, filename);
if (video_driver_list)
load_per_output_config(mconfig, PROFILE_CFG_VO, video_driver_list[0]);
@@ -3115,6 +3123,8 @@
filename = play_tree_iter_get_file(mpctx->playtree_iter, 1);
}
}
+
+ if (!profile_config_loaded) load_profile_config(mconfig, filename);
//---------------------------------------------------------------------------
if (mpctx->video_out && vo_config_count)
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic