- 25 Jan, 2009 1 commit
-
-
Max Kellermann authored
On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
-
- 17 Jan, 2009 1 commit
-
-
Max Kellermann authored
Some plugins used the APE or ID3 tag loader as a fallback when their own methods of loading tags did not work. Move this code out of all decoder plugins, into song_file_update().
-
- 08 Jan, 2009 1 commit
-
-
Max Kellermann authored
-
- 29 Dec, 2008 1 commit
-
-
Frank Mulder authored
I tried to search for a certain composer in my collection, but only non-mp4 files showed up. The source code reveals that this tag is not read. This can be fixed by reading the 'Writer' tag field, in mp4_plugin.c, in function mp4_load_tag. I actually tried this, and after compiling with those lines added, also mp4 (.m4a) files showed up when searching for a composer.
-
- 21 Nov, 2008 1 commit
-
-
Max Kellermann authored
Refuse to play audio formats which are not supported by MPD.
-
- 16 Nov, 2008 1 commit
-
-
Max Kellermann authored
neaacdec.h declares all arguments as "unsigned long", but internally expects uint32_t pointers. This triggers gcc warnings on 64 bit architectures. To avoid that, make configure.ac detect whether we're using Debian's corrected headers or the original libfaad headers. In any case, pass a pointer to an uint32_t, conditionally casted to "unsigned long*".
-
- 11 Nov, 2008 1 commit
-
-
Max Kellermann authored
The stream_decode() and file_decode() methods returned a boolean, indicating whether they were able to decode the song. This is redundant, since we already know that: if decoder_initialized() has been called (and dc.state==DECODE), the plugin succeeded. Change both methods to return void.
-
- 04 Nov, 2008 9 commits
-
-
Max Kellermann authored
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
-
Max Kellermann authored
Eliminate a superfluous decoder_get_command() call. decoder_data() already returns the command.
-
Max Kellermann authored
Removed the duplicate audio_format initialization.
-
Max Kellermann authored
decoder_read() handles decoder commands, and should be used in decoder plugins.
-
Max Kellermann authored
We need the decoder object, so we have to begin passing a new struct to these callbacks, instead of only the pointer to the input_stream object.
-
Max Kellermann authored
Replace deprecated code with GLib.
-
Max Kellermann authored
The API of mp4_load_tag() was strange: it always returned a tag object, no matter if a tag was found in the file; the existence of a tag was indicated with the tag_found integer reference. This flag is superfluous, since we can simply check whether the tag is empty or not.
-
Max Kellermann authored
Allocate the mp4ff_callback_t object on the stack. This is easier to handle, since we don't have to free it. Incidentally, this fixes a memory leak in mp4_load_tag().
-
Max Kellermann authored
Renamed functions and variables.
-
- 02 Nov, 2008 1 commit
-
-
Max Kellermann authored
Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file.
-
- 01 Nov, 2008 2 commits
-
-
Max Kellermann authored
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
-
Max Kellermann authored
All decoder_plugin structs are initialized at compile time, and must never change.
-
- 31 Oct, 2008 1 commit
-
-
Max Kellermann authored
-
- 30 Oct, 2008 1 commit
-
-
Max Kellermann authored
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
-
- 29 Oct, 2008 2 commits
-
-
Max Kellermann authored
A decoder_flush() invocation was missing in the FLAC plugin, resulting in casual assertion failures due to a wrong assumption about the last chunk's audio format. It's much easier to remove that decoder_flush() function and make the decoder thread call ob_flush().
-
Max Kellermann authored
Call ob_clear() in decoder_command_finished() instead of implementing that call in every decoder plugin.
-
- 26 Oct, 2008 4 commits
-
-
Max Kellermann authored
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
-
Max Kellermann authored
Renamed all functions and variables.
-
Max Kellermann authored
Everybody should use struct input_stream.
-
Max Kellermann authored
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.
-
- 25 Oct, 2008 1 commit
-
-
Max Kellermann authored
MPD shouldn't integrate sources of other libraries. Since libmp4ff is part of libfaad, we should remove the old copy from src/mp4ff and link with the current version from libfaad instead.
-
- 17 Oct, 2008 2 commits
-
-
Max Kellermann authored
Don't compile the sources of disabled decoder plugins at all, and don't attempt to register these.
-
Max Kellermann authored
The nmemb argument isn't actually useful, and one of nmemb and size was always passed as 1. Remove it.
-
- 10 Oct, 2008 1 commit
-
-
Max Kellermann authored
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
-
- 08 Oct, 2008 2 commits
-
-
Max Kellermann authored
"bool" should be used in C99 programs for boolean values.
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-
- 29 Sep, 2008 2 commits
-
-
Max Kellermann authored
The old struct initializers are error prone and don't allow moving elements around. Since we are going to overhaul some of the APIs soon, it's easier to have all implementations use C99 initializers.
-
Eric Wong authored
Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the mind needs to retrain itself to skip over the first 4 tokens of a type to get to its meaning. So avoid having extra characters on my terminal to make it easier to follow code at 2:30 am in the morning. Please report any new issues you may come across on Free toolchains. I realize how difficult it can be to build/maintain cross-compiling toolchains and I have no intention of forcing people to upgrade their toolchains to build mpd. Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
-
- 12 Sep, 2008 1 commit
-
-
Terry authored
A crafted mp4 file could cause an integer overflow in mp4_decode function in src/inputPlugins/mp4_plugin.c. mp4ff_num_samples() function returns some tainted value. sizeof(float) * numSamples is an integer overflow operation if numSamples is too huge, so xmalloc will allocate a small memory region. I constructe a mp4 file, and use faad2 to open the file. mp4ff_num_samples() returns -1. So I think mpd bears from the same problem.
-
- 07 Sep, 2008 1 commit
-
-
Max Kellermann authored
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
-
- 29 Aug, 2008 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
-
- 26 Aug, 2008 1 commit
-
-
Max Kellermann authored
"decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
-