Commit Graph

60 Commits

Author SHA1 Message Date
wm4 266230ad64 Silence some compiler warnings
None of these were actual issues.
2013-05-21 00:04:27 +02:00
Stephen Hutchinson 33639d0156 stream_cddb: fix compilation on MinGW-w64
Like the VCD case, stream_cddb.c relies on ntddcdrm.h, which is no
longer under the ddk directory.
2013-04-06 00:00:21 +02:00
wm4 07d14bd323 Silence two compiler warnings
Both should be harmless.
2013-01-16 02:03:21 +01:00
Stefano Pigozzi fab9febdc3 path: add mp_find_config_file and reorganize some of the code
Add `mp_find_config_file` to search different known paths and use that in
ass_mp to look for the fontconfig configuration file.

Some incidental changes spawned by this feature where:

 * Buffer allocation for the strings containing the paths is now performed
   with talloc. All of the allocations are done on a NULL context, but it still
   improves readability of the code.
 * Move the OSX function for lookup inside of a bundle: this code path was
   currently not used by the bundle generated with `make osxbundle`. The plan
   is to use it again in a future commit to get a fontconfig config file.
2012-12-15 17:38:00 +01:00
wm4 4873b32c59 Rename directories, move files (step 2 of 2)
Finish renaming directories and moving files. Adjust all include
statements to make the previous commit compile.

The two commits are separate, because git is bad at tracking renames
and content changes at the same time.

Also take this as an opportunity to remove the separation between
"common" and "mplayer" sources in the Makefile. ("common" used to be
shared between mplayer and mencoder.)
2012-11-12 20:08:18 +01:00
reimar 7d5a6b9b02 stream_cddb: replace sprintf with snprintf
Replace sprintf with snprintf.

To my knowledge the only "real" issue this fixes
is that setting certain environment variables to
very long strings might have caused overflows.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35306 b3059339-0415-0410-9bf9-f77b7e298cf2
2012-10-31 22:44:05 +01:00
Uoti Urpala e2fc1f640f build: remove OS/2 support 2012-04-06 17:45:56 +03:00
wm4 a1244111a7 windows support: unicode filenames
Windows uses a legacy codepage for char* / runtime functions accepting
char *. Using UTF-8 as the codepage with setlocale() is explicitly
forbidden.

Work this around by overriding the MSVCRT functions with wrapper
macros, that assume UTF-8 and use "proper" API calls like _wopen etc.
to deal with unicode filenames. All code that uses standard functions
that take or return filenames must now include osdep/io.h. stat()
can't be overridden, because MinGW-w64 itself defines "stat" as a
macro. Change code to use use mp_stat() instead.

This is not perfectly clean, but still somewhat sane, and much better
than littering the rest of the mplayer code with MinGW specific hacks.
It's also a bit fragile, but that's actually little different from the
previous situation. Also, MinGW is unlikely to ever include a nice way
of dealing with this.
2012-03-09 20:48:54 +02:00
vayne f293935d39 Windows: stream_cddb.c: include <path.h> for MinGW
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33449 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-06-29 10:27: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
diego a1b8092c87 Factorize MPlayer/MEncoder version string handling.
The string now resides in a central object file instead of
being duplicated in every file that requires a version string.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31577 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:43 +02:00
diego 322fecd8de stream_cddb: move structs to the file they're used in
Move cddb_data_t and cd_toc_t structs to the only place they are used.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31514 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego 5be8d4d633 stream_cddb: Remove unused static functions
Remove unused static function cddb_get_freedb_sites(), fixes the warning:
stream/stream_cddb.c:747: warning: 'cddb_get_freedb_sites' defined but not used

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

Remove unused static function cddb_freedb_sites_parse().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31510 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala 0269d22d32 Merge svn changes up to r30876 2010-03-10 03:18:42 +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 acdce0176a Merge svn changes up to r30732 2010-03-10 01:25:15 +02:00
Uoti Urpala 327463be52 Merge svn changes up to r30672 2010-03-10 00:34:16 +02:00
Uoti Urpala 13221a7165 Merge svn changes up to r30663
Conflicts:
	gui/cfg.c
	libmpcodecs/vd_dmo.c
	mplayer.c
2010-03-10 00:13:11 +02:00
Uoti Urpala 12d3caebc7 Merge svn changes up to r30475 2010-03-09 19:18:43 +02:00
komh dd491c0d28 Define O_BINARY in stream/stream.h unless it is defined yet, and use it
in other places.

This removes platform specific checks and prevents repeated definitions
of O_BINARY.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30850 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-06 07:24:41 +00:00
komh 35fbd55c0f Add cddb:// support for OS/2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30788 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-28 03:26:18 +00:00
reimar b99077dc4c Remove unused function declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30736 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:29:00 +00:00
reimar e522920697 Make local-only cddb functions static.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30735 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:27:53 +00:00
komh 16d8b08089 Define O_BINARY if it is undefined.
This removes a platform check for open().



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30727 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 09:09:57 +00:00
diego d393029ce2 cosmetics: K&R coding style, indent with 4 spaces, no tabs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30671 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 19:57:47 +00:00
komh c9cf9649cf Add missing 'defined' for __bsdi__.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30655 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-19 13:40:04 +00:00
diego 59e26907b6 Add license header to all files missing it in the stream subdirectory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 22:26:47 +00:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
Amar Takhar e306174952 Translation system changes part 2: replace macros by strings
Replace all MSGTR_ macros in the source by the corresponding English
string.
2009-07-07 01:38:20 +03:00
Amar Takhar b5972d6f14 Translation system changes part 1: wrap translated strings
Replace mp_msg() calls which have a translated string as the format
argument with mp_tmsg and add _() around all other translated strings.
2009-07-07 01:28:07 +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
diego 0f65d3be9d Convert HAVE_WINSOCK2_H into a 0/1 definition.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28437 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-01 13:42:27 +00:00
diego 4d644f513c Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.
This avoids a pointless indirection that only obscures what is really done.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-13 16:23:55 +00:00
diego 3af860b877 Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.
This is what it is called in FFmpeg and more consistent with other
names for similar conditionals. This fixes a potential compilation
failure on MinGW, as described in Bugzilla #1262.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27493 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-29 20:05:08 +00:00
reimar 803385a5d7 Replace S_IREAD|S_IWRITE by POSIX-compatible S_IRUSR|S_IWUSR (not exactly the same, but should not matter).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27289 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-15 17:35:52 +00:00
diego dfa733c50b Add disc ID to -identify output.
patch by Mathieu Schroeter, mathieu.schroeter gamesover ch


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27206 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-05 11:39:43 +00:00
diego c657594049 cosmetics: Remove useless parentheses from return statements.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26788 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-16 08:43:15 +00:00
diego 3cf3483e39 #include just libavutil/common.h, not all of libavutil/intreadwrite.h.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25980 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-11 09:05:31 +00:00
rtogni 8c3a19d8a8 Prevent possible buffer overflow on album_title[]
Based on a patch by Adam Bozanich abozanich musecurity com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25824 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-20 20:58:02 +00:00
ulion 0556fa54b5 Fix compilation failue:
stream_cddb.c: In function 'cddb_read_cache':
stream_cddb.c:341: error: 'UINT_MAX' undeclared (first use in this function)
stream_cddb.c:341: error: (Each undeclared identifier is reported only once
stream_cddb.c:341: error: for each function it appears in.)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25820 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-20 16:13:51 +00:00
reimar 925d887fe3 Reindent
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25808 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 16:58:57 +00:00
reimar e1c3f319f2 Simplify and keep terminating end-of-line
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25807 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 16:57:53 +00:00
reimar 5efa59daeb Remove a broken and useless hack to avoid a memcpy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25806 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 16:49:01 +00:00
reimar 57f7b01ee4 Cached file must be 0-terminated since we use string processing functions on it
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25805 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 16:41:35 +00:00
reimar 20b28ac75e Make sure we do not write the terminating 0 out of bounds
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25804 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 16:33:06 +00:00
ulion 6277b4387f Support cddb on darwin.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25421 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-16 11:31:52 +00:00
diego b000a6a519 ISO8859-1 --> UTF-8
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23754 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-09 19:50:36 +00:00
reimar 9afe162ba4 Avoiding sscanf in cddb support reading more data with %s than buffer size
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23470 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 11:13:32 +00:00