Commit Graph

57 Commits

Author SHA1 Message Date
Uoti Urpala b33bb28ea3 build: fix --enable-debug, remove some "#ifdef MP_DEBUG"
Recent commit 5d5ca22a6d ("options: commandline: accept --foo=xyz
style options") left some bad code under "#ifdef MP_DEBUG" in
playtree.c, which caused a compilation failure if configured with
"--enable-debug". Fix this. Having the "#ifdef MP_DEBUG" there was
completely unnecessary; it only increased the risk for this kind of
problems for no real benefit - executing the asserts under it would
have no noticeable performance or other penalty in default builds
either. Remove several cases of such harmful "#ifdef MP_DEBUG".
2011-07-30 19:03:20 +03:00
Uoti Urpala 5d5ca22a6d options: commandline: accept --foo=xyz style options
Allow writing commandline options with two leading dashes. In this
mode a parameter for the option, if any, follows after a '=';
following separate commandline arguments are never consumed as a
parameter to a previous double-dash option.

Flag options may omit parameter and behave like old single-dash
syntax. "--fs=yes", "--fs=no" and "--fs" are all valid; the first two
behave like configuration file "fs=yes" and "fs=no", and last is the
same as old "-fs" (same effect as "--fs=yes").
2011-07-29 07:24:09 +03:00
Uoti Urpala 8bd13d50cf playtree: use talloc to allocate file parameters 2011-07-29 06:34:04 +03:00
Uoti Urpala e873d703e9 options: change option parsing to use bstr
Using bstr allows simpler parsing code, especially because it avoids
the need to modify or copy strings just to terminate extracted
substrings.
2011-07-29 05:50:38 +03:00
Uoti Urpala 507fa7e2c2 options: indicate ambiguous option parameters explicitly
Command line options like "-foo xyz" are ambiguous: "xyz" may be a
parameter to the option "foo" or an unrelated argument. Instead of
relying on the struct m_config mode field (commandline/file) pass
parameters to specify ambiguous mode explicitly. Meant for "--foo"
options which are never ambiguous on command line either.
2011-07-29 05:02:05 +03:00
reimar 0cace1d722 playtree: make some char * function arguments const
Remove a pointless "return".

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33607 b3059339-0415-0410-9bf9-f77b7e298cf2

Mark some char * arguments that are strdup'd const,
makes the API slightly clearer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33608 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
reimar a71340bd40 playtree: free parameter values when entry is freed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33364 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-06-29 06:40:37 +03:00
Clément Bœsch b68f9fef32 cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
diego 12d3e0df99 cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:12 +02:00
siretart 733dabb37e playtree: fix segfault on empty playlist
Add a sanity check to avoid a segmentation fault in playtree.c on
empty playlists.
This is Debian Bug: http://bugs.debian.org/591525

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31960 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
Uoti Urpala bc1d0ca37d Merge svn changes up to r30798 2010-03-10 02:35:02 +02:00
Uoti Urpala e74708f619 Merge svn changes up to r30748 2010-03-10 01:50:55 +02:00
Uoti Urpala 12d3caebc7 Merge svn changes up to r30475 2010-03-09 19:18:43 +02:00
cehoyos 49d31b325b Remove unused static function play_tree_set_flag().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30771 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 20:55:41 +00:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-26 15:01:37 +00:00
diego 93c1e23c47 Mark some more functions that are not used outside of their files as static.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30632 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-18 09:26:00 +00:00
diego 99c1bbca2a Add license header to all top-level files missing them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 23:24:23 +00:00
Uoti Urpala 287b62163e Merge svn changes up to r29912 2009-11-16 07:01:46 +02:00
adrian 510a5f268c Remove redundant duplicate option handling in the playtree.
Fixes the use of options on the command line which should not override each other (like -vf-add).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29768 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-10-10 10:39:05 +00:00
Anton Khirnov 87366694d8 Remove the internal GUI
The GUI is badly designed and too closely coupled to the internal
details of other code. The GUI code is in bad shape and unmaintained
for years. There is no indication that anyone would maintain it in the
future either. Even if someone did volunteer to implement a better
integrated GUI having the current code in the tree probably wouldn't
help much. So get rid of it.
2009-07-07 21:49:42 +03:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
Uoti Urpala dd888b05ff Merge svn changes up to r28366
Contains more changes needed to sync build system with latest FFmpeg.

Conflicts:
	Makefile
	configure
	mplayer.c
2009-01-26 00:58:15 +02:00
reimar 6fc95c1817 Actually abort (return NULL) in the alloc-failure check in play_tree_new
instead of going right ahead and crashing.
Patch by Luis Felipe Strano Moraes (luis strano  gmail com).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28355 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-25 18:25:11 +00:00
Uoti Urpala f6dfaf26f8 Make various functions static 2008-08-12 14:57:12 +03:00
ben 3f8db043f5 revert non-acked r27106
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27120 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-21 09:15:25 +00:00
ben 6a55bbb4a2 Only "pop" subtree params if they had previously been "pushed",
and afterwards reset the "pushed" value to 0 again.
Similarly only set the PLAY_TREE_RND_PLAYED flag
if the entry had been pushed before.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27106 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-20 19:51:43 +00:00
diego e91fc44d4c typo: begining --> beginning
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25517 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-23 21:22:02 +00:00
diego f5a10ea82f typo fix: childs --> children
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23892 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-28 14:27:55 +00:00
reimar 123e80594d Cast sizeof() to int in mp_msg arguments so it fits the format string on 64bit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23634 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-24 10:39:04 +00:00
diego a205e9444c Remove unused variable, patch by Stefan Huehner stefan [at] huehner [dot] org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18891 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-03 14:52:07 +00:00
reynaldo 3afd65b3af rm unnecesary casts from void* - part 3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18884 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-02 08:17:07 +00:00
reynaldo 5b4ec50d44 rm unnecesary void* casts - part 1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18874 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-01 03:56:13 +00:00
albeu 400a9fab2e Doxygen Attack! - Chapter 3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18266 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-25 01:26:10 +00:00
reimar 1e9749979b fix "last file is always played last" bug.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13885 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-11-05 22:45:16 +00:00
reimar ef8f08572b fix -loop in combination with -shuffle
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13709 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-10-20 17:30:29 +00:00
diego 42b784ac1a string handling security fixes
patch by Nicholas Kain, Alexander Strasser <eclipse7@gmx.net>
reviewed by Pontscho, Alex, Rich


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12647 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-06-25 16:49:53 +00:00
albeu ca89a84e8a Fix -shuffle with remote playlist
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10395 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-07-08 10:45:05 +00:00
albeu 2f0fdb59c0 Use new config headers
Remove the hack used to support dvd://, tv:// and vcd://


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9749 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-30 17:09:17 +00:00
arpi f7b66d5568 this patch adds a high-level-api to playtree, allowing to use it more easily
and hopefully also letting one doing less mistakes, as current low-level-api
is not rock-solid ...
patch by Fabian Franz <FabianFranz@gmx.de>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9291 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-02-05 23:02:05 +00:00
albeu 5a4c2c738e Add random stepping support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8175 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-12 23:39:35 +00:00
albeu 126725660d New config system + cleanup of header inter dependency
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8165 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-12 01:56:42 +00:00
albeu 2c33145134 10L found by jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8063 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-02 22:44:15 +00:00
albeu e87d472777 Portability fix with realloc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5803 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-04-23 20:06:00 +00:00
pontscho da6135b983 fix playlist bug with gui and rewrite mousecursor show/hide code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5652 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-04-16 17:41:29 +00:00
albeu 61f5edf208 Set the params given to a playlist url to the playlist
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5218 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-03-20 10:27:27 +00:00
pontscho d751518e07 small bug fixed and workarounds :(
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4975 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-03-07 11:57:33 +00:00
pontscho 95022a8271 workaround for gui a short time.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4961 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-03-06 23:27:20 +00:00
albeu 4fd6e57d09 In the good way this time, (1 and 0 was swaped 10*10^10l for me ;))
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4782 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-02-21 13:11:31 +00:00
albeu 641c8325bc Fixed (I hope) little bug wich lead to sig11 after last playtree entry
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4769 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-02-20 17:03:35 +00:00