Commit Graph

5652 Commits

Author SHA1 Message Date
Max Kellermann
acd3f8cd91 decoder/ffmpeg: free AVFormatContext on error
Fix a memory leak in some code paths.
2010-01-18 11:05:15 +01:00
Max Kellermann
ca1fc13116 decoder_api: removed function decoder_get_uri()
Use input_stream.uri.
2010-01-18 10:21:57 +01:00
Max Kellermann
9cb7760c5e input_stream: added attribute "uri" 2010-01-18 10:18:41 +01:00
Max Kellermann
fb9bd53328 input_stream: added function input_stream_deinit()
All close() implementations must call this method.
2010-01-18 09:57:53 +01:00
Max Kellermann
a0a26d3341 Merge release 0.15.8 from branch 'v0.15.x
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/decoder/ffmpeg_decoder_plugin.c
	src/decoder_thread.c
2010-01-18 07:52:58 +01:00
Avuton Olrich
728c66e7e3 Modify version string to post-release version 0.15.9~git 2010-01-18 07:41:15 +01:00
Avuton Olrich
760569fc66 mpd version 0.15.8 2010-01-18 07:41:08 +01:00
Max Kellermann
9d4b7ab113 decoder_thread: don't fall back to "mad" unless no plugin matches
When all plugins have failed, MPD used to fall back to the "mad"
decoder plugin, to handle those radio streams without a Content-Type
response header.  This however leads to unexpected results (garbage
being played) when the stream isn't really mp3.  Since we care little
about "bad" streams, we shouldn't have hacks which have bad side
effects.

Let's get rid of this hack now!  Only try to "mad" plugin if there was
no match at all (Content-Type, path suffix) and no other plugin has
been tried.
2010-01-17 17:09:10 +01:00
Max Kellermann
8ac776c58b decoder_thread: don't try a plugin twice (MIME type & suffix)
Manage a linked list of plugins which were already tried.
2010-01-17 16:47:04 +01:00
Max Kellermann
2579a2f924 decoder/ffmpeg: added more MIME types
Taken from the ffmpeg sources.
2010-01-17 16:00:14 +01:00
Max Kellermann
006f4be71c fd_util: include ws2tcpip.h for socklen_t 2010-01-17 14:48:52 +01:00
Max Kellermann
163e05f5a0 fd_util: fixed WIN32 versions of pipe()
Use the correct parameter name.
2010-01-17 14:43:15 +01:00
Max Kellermann
02526eda86 text_file: don't strip trailing whitespace
Only delete the newline characters (\n and optionally \r).  This
allows the database file to store file names with trailing whitespace.
2010-01-17 12:52:11 +01:00
Max Kellermann
828a5f552f output/pulse: clear the "mainloop" attribute on error
When enabling the pulse device fails, clear po->mainloop after
pa_threaded_mainloop_free() has finished.  This is important for the
assertions.

Two wrong g_free() calls were also removed.
2010-01-17 12:03:22 +01:00
Max Kellermann
a7664b98ba Makefile.am: link test/run_decoder and test/read_tags with timer.c
Needed for the fluidsynth decoder plugin.
2010-01-17 11:21:35 +01:00
Max Kellermann
1b441837f1 decoder/ffmpeg: append file name suffix to virtual stream URL
To allow libavformat to detect the format of the input file, append
the suffix of the input file to the URL of the virtual stream.  This
specifically enables the "shorten" codec, which is supported by
libavformat/raw.c, detected only by the suffix.
2010-01-17 02:36:07 +01:00
Max Kellermann
e43bf52cbb configure.ac: disable -Wdeclaration-after-statement
Allow declaration after statement.
2010-01-17 02:36:03 +01:00
Max Kellermann
26841b6058 output/alsa: support packed 24 bit samples 2010-01-17 00:43:24 +01:00
Max Kellermann
1abfcc56af audio_format: support packed 24 bit samples 2010-01-16 23:44:54 +01:00
Max Kellermann
da47afe7d1 output/alsa: probe all sample formats in a loop
More code simplification.  Probe all formats, no matter which input
format.
2010-01-16 23:44:52 +01:00
Max Kellermann
96546c1a8a output/alsa: merged code into alsa_output_try_format()
Remove the debug log messages, because they are duplicate (see
ao_open() in output_thread.c).
2010-01-16 23:44:50 +01:00
Max Kellermann
579a8a96ea output/alsa: pass sample_format to get_bitformat() 2010-01-16 23:44:48 +01:00
Max Kellermann
79848e3414 output/alsa: moved code to alsa_output_setup_format() 2010-01-16 23:44:42 +01:00
Max Kellermann
87c861cae3 test/run_convert: implement a GLib log callback
Log to stderr instead of the default stdout.  We need a pristine
stdout for the conversion result.
2010-01-16 23:44:40 +01:00
Max Kellermann
8f326a33ee test/run_convert: use fifo_buffer to adapt to odd sample sizes
Ensure that the pcm_convert() length argument is aligned to the sample
size.
2010-01-16 23:25:58 +01:00
Max Kellermann
8ba08edd0e queue: don't repeat current song in consume mode
Check consume mode in queue_next_order(), because the current song
would be deleted as soon as it's finished; it cannot be played again.
2010-01-16 20:58:24 +01:00
Max Kellermann
90d16af66a decoder_thread: fix CUE track playback
The patch "input/file: don't fall back to parent directory" introduced
a regression: when trying to play a CUE track, decoder_run_song()
tries to open the file as a stream first, but this fails, because the
path is virtual.

This patch fixes decoder_run_song() (instead of reverting the previous
patch) to accept input_stream_open() failures if the song is a local
file.  It passes the responsibility to handle non-existing files to
the decoder's file_decode() method.
2010-01-16 19:20:11 +01:00
Max Kellermann
777bd7c1e1 NEWS: added missing entry 2010-01-16 18:41:34 +01:00
Max Kellermann
a942384fbf decoder/flac: support streams without STREAMINFO block 2010-01-06 10:17:16 +01:00
Max Kellermann
de0cdee4aa decoder/flac: pass bits_per_sample to flac_sample_format()
Easier to reuse the function.
2010-01-06 09:55:20 +01:00
Max Kellermann
550c9319e9 decoder/flac: moved decoder initialization to _flac_common.c
Invoke decoder_initialized() in the libFLAC metadata callback.  This
merges code from the FLAC and the OggFLAC decoder plugin into the
common library.
2010-01-06 09:50:34 +01:00
Max Kellermann
ae9c02b3a8 decoder/flac: remember audio_format, not stream_info 2010-01-06 09:00:32 +01:00
Max Kellermann
6f6d47dd20 decoder/flac: removed CUE sheet support
This feature has been moved to the "flac" playlist plugin.
2010-01-06 08:52:35 +01:00
Max Kellermann
030e61115c playlist: added a FLAC playlist plugin
This playlist plugin handles FLAC files with embedded CUE sheets.
2010-01-06 08:50:52 +01:00
Max Kellermann
d6d5caae23 decoder/flac: moved flac_tag_load() to flac_metadata.c
Make this code is reusable.
2010-01-06 08:50:35 +01:00
Max Kellermann
382691179f tag: fixed memmove() size argument in tag_delete_item()
This function has always been broken, but fortunately nobody used it.
2010-01-06 08:48:23 +01:00
Max Kellermann
01c5cb985c playlist_queue: convert absolute paths
Accept absolute paths if they point into the music directory.
2010-01-06 08:00:35 +01:00
Max Kellermann
8a5d2c3c83 playlist_queue: use the "uri" variable earlier
Preparation for the next patch.
2010-01-06 08:00:02 +01:00
Max Kellermann
2f8135ef8b input/rewind: enable the "rewind" wrapper for all non-seekable streams
Don't limit the "rewind" input plugin to CURL streams.
2010-01-04 21:45:32 +01:00
Max Kellermann
9b9abff972 renamed decoder plugin sources
Make it X_decoder_plugin.c.
2010-01-04 21:45:32 +01:00
Max Kellermann
c69cc31de0 decoder/mad: fix build error without libid3tag 2010-01-04 21:45:32 +01:00
Max Kellermann
241e94936f replay_gain: moved code to replay_gain_config.c 2010-01-04 21:02:47 +01:00
Max Kellermann
1330274ffc replay_gain: moved code to replay_gain_info.c 2010-01-04 21:02:36 +01:00
Max Kellermann
0e183d3fa1 replay_gain: refactor API, move code to replay_gain_state.c
The replay_gain_state struct holds the precalculated scale factor,
which is removed from struct replay_gain_info.
2010-01-04 20:54:01 +01:00
Max Kellermann
cd8f92c928 decoder_api: added function decoder_replay_gain()
This function replaces the replay_gain_info parameter for
decoder_data().  This allows the decoder to announce replay gain
changes, instead of having to pass the same object over and over.
2010-01-04 20:42:49 +01:00
Max Kellermann
e58b4f773f replay_gain: added function replay_gain_info_dup() 2010-01-04 20:42:49 +01:00
Max Kellermann
604ca50b65 valgrind.suppressions: added new suppressions 2010-01-04 20:42:49 +01:00
Max Kellermann
537e353546 replay_gain: removed overly verbose debug message
Don't log "ReplayGain is missing".
2010-01-02 23:46:44 +01:00
Max Kellermann
f95d7b13da configure.ac: disable -Wdeclaration-after-statement
Allow declaration after statement.
2010-01-02 23:46:42 +01:00
Max Kellermann
915182bcb8 output_all: reset elapsed_time at song border
Another quirk fixed: after the last chunk of a song has been played,
the "elapsed_time" variable is set to the chunk's time stamp.  When
the client receives the PLAYER idle event and asks MPD for the current
time stamp, MPD will return the last time stamp of the previous song
when it hasn't played the first chunk of the current song yet.
2010-01-02 21:16:51 +01:00