Commit Graph

10012 Commits

Author SHA1 Message Date
Max Kellermann f85d4d28d1 output/alsa: work around dmix non-blocking snd_pcm_drain() bug
See code comment.  Bug was reported against MPD, but it's really an
alsa-lib bug.

 https://bugs.musicpd.org/view.php?id=4662
2017-03-29 20:36:04 +02:00
Max Kellermann b4e4bdcda9 lib/alsa/Version: wrapper for snd_asoundlib_version() 2017-03-29 20:33:06 +02:00
Max Kellermann dae8b78569 output/httpd: copy the Page reference; fixes use-after-free 2017-03-29 20:17:09 +02:00
Max Kellermann e26d49efb7 release v0.20.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAljCzQcQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnIXD/9ltsmg3VC81NHOmcUehFgUaLyNh8o2iEr9
 tQfdydQxfTXBIGztMoPsPz71da8BIqAgMTCTGAEpTUXIW6ViGkgsoDlR2fAOagG2
 ybHn2q3WsPERJvkGZ4xIo0ti0pLLy7wrFpmShgOKuwb6YqOgSV+rbu/CaQanxVJE
 S599vo6rV/OI4KFSYWJbfafifN/Mqmzfl/D/tB5xaMvhas60XZ6pZTp/xH8OlnML
 8qkgPmN3gJe7DPq6L3rdwKobJuS1X6NLHSp1DyGVRy68B0sd3tMmbOocMeyi1OlE
 1z/n/M+dcSUhdHAh/Pg0wrvH0UpUlJ11blSDiWB9gqr9oOvCZO+OcPCnk0QJrqq+
 qselDNWBLvVPESbxlPO4OUbV6jxPPhVgz18RYl6JaJeUFjXkuiytI/t6jsbVM3+f
 ZC1UgO+TznCuDjjMj35RP9QDkUQpuH6CK4+tyxbH7Fe4KQi02FQdtK8Q/CnESBLl
 alTLYQk7VlwL1oMgezoZfTLDbsihRrEO6Y0cp/pObUrEjQ65706UGUf61PRQGBM9
 DlEPqfuH8TMgksxDIrkt68pWjyCXhhUCA+RsyFJoMp7Xq6Gy2pZUn2yKCmTXLte/
 v5xW9FuiSvKUKlvYbfk/q3u/GTCJELf0eY3y0Eryqp6nOEZHmzz8HOF7Bs2PxM3B
 eU/fEKWxVQ==
 =21bM
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.6'

release v0.20.6
2017-03-10 17:02:32 +01:00
Max Kellermann ac8dce6599 lib/curl/Request: "ICY 200 OK" is a response boundary header 2017-03-10 16:28:02 +01:00
Max Kellermann 190d525099 lib/curl/Request: move code to IsResponseBoundaryHeader() 2017-03-10 16:24:30 +01:00
Max Kellermann 1b6666fa39 Partition: handle SYNC_WITH_PLAYER before TAG_MODIFIED
The TAG_MODIFIED handler (i.e. playlist::TagModified()) works only if
the modified song is the current song - something that is not updated
until SYNC_WITH_PLAYER is finished.  This fixes tag updates right
after a new song is started.
2017-03-10 16:11:34 +01:00
Max Kellermann 1dd01c99e8 decoder/sidplay: make compatible with libsidplayfp < 1.8
https://bugs.musicpd.org/view.php?id=4665
2017-03-10 13:48:52 +01:00
Thomas Zander d50b30a498 Add missing include for cstdlib, otherwise free() is undefined 2017-03-07 20:02:36 +01:00
Max Kellermann 42a3a87f13 util/HugeAllocator: paranoid check for sysconf()<0
Just in case.
2017-03-01 21:50:26 +01:00
Ben Boeckel 9dfedbe619 ReusableArray: fix build error on GCC7
GCC7 outputs the following error without this change:

    src/util/ReusableArray.hxx:61:35: error: no matching function for call to ‘swap(size_t&, const size_t&)’
       std::swap(capacity, src.capacity);

which can be resolved by just using an rvalue-reference rather than a
const rvalue-reference.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
2017-03-01 19:38:41 +01:00
Max Kellermann b2f2c9322b db/simple/Mount: workaround for libc++ 2017-03-01 17:31:26 +01:00
Max Kellermann 3be2051808 decoder/Thread: check ENABLE_FFMPEG, not HAVE_FFMPEG
This repairs the damage to commit 74dbaade6f done by commit
b3f5b4932c
2017-03-01 17:06:23 +01:00
Max Kellermann ff32b0dc9b input/curl: use %lu instead of %llu
Fixes a GCC warning because %llu appears to be unsupported by the
Windows standard library.
2017-03-01 16:44:11 +01:00
Max Kellermann c1869a11af input/curl: format Range offset as unsigned 2017-03-01 16:44:08 +01:00
Max Kellermann e22a4fdba4 command/Error: improve libstdc++ 4.9.x detection for std::rethrow_if_nested() workaround 2017-03-01 16:38:22 +01:00
Max Kellermann 29a7b2c5b5 decoder/mpcdec: ignore empty frames
https://bugs.musicpd.org/view.php?id=4656 describes a crash due to
division by zero because frame.samples==0.  This should never happen,
but apparently can happen after seeking.  The best we can do is to
just ignore this frame.
2017-03-01 16:13:21 +01:00
Max Kellermann e9e853b19a command/Partition: add command "partition" to switch to another partition 2017-02-25 10:26:33 +01:00
Max Kellermann e48ea5f23a Instance: add method FindPartition() 2017-02-25 10:26:33 +01:00
Max Kellermann a99bab935a Client: add method SetPartition() 2017-02-25 10:25:16 +01:00
Max Kellermann 3eee35e1f7 Client: convert partition to pointer
Prepare to make it mutable.
2017-02-25 10:23:23 +01:00
Max Kellermann c7396b0675 Client: add method GetPartition(), make partition private 2017-02-25 10:20:09 +01:00
Max Kellermann e3ee60e7af command/storage: use Instance::EmitIdle()
These events are relevant for all partitions.
2017-02-25 10:20:07 +01:00
Max Kellermann 05b8ddac4c Client: add method GetInstance() 2017-02-25 10:20:05 +01:00
Max Kellermann 668724de4e Client: replace playlist and player_control with getter methods
Prepare to convert "partition" to a mutable pointer.
2017-02-25 09:24:19 +01:00
Max Kellermann 71ce1a25dd SongPrint: remove Storage::MapToRelativeUTF8() call
This code (added 7 years ago with commit b233c145f) has been obsoleted
by the SongLoader class (added 3 years ago).
2017-02-24 13:56:13 +01:00
Max Kellermann cd522f524d fs/Traits: allow base to end with a slash in Relative()
Fixes false negatives:

 http://foo/dav/example.ogg mismatches http://foo/dav/

.. because StringAfterPrefix() returns just "example.ogg", without
trailing slash (it existed, but was eaten already by the base
matcher).
2017-02-24 13:50:29 +01:00
Max Kellermann ca559b1db6 input/curl: use %lu instead of %llu
Fixes a GCC warning because %llu appears to be unsupported by the
Windows standard library.
2017-02-21 12:06:56 +01:00
Max Kellermann a8e76fb345 input/curl: format Range offset as unsigned 2017-02-21 12:06:03 +01:00
Max Kellermann 1d445d1039 SongPrint: move duplicate code into PrintRange() 2017-02-20 22:00:11 +01:00
Max Kellermann 29d03ab937 release v0.20.5
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlirVtMQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEgbaD/9tgcgcnbiWGkNDMf0qfqfaiY80wA4HbSBT
 qbKzan/kuiPXL6xcgw8YRYdAjyaIyw//f1q0SL8/LKvVQ4CrlTEQzOQUzrAOe02n
 m35/6YKZVzziMRwuSZY4oQ4WH7SE87gthYIykRt59adznr2QNtQe53SnXd8ukGtf
 l8xlLNuIiEwIo5PZ8ObEZH1dUP1PWtfJlxQfbJ2JhZTOR/qPfrpIzSK4GVY0ZXdz
 EO6BIZyDgPfeZCPBZqiKmw4vcdIHBhG9ZgtOhX3YATV7ZSYqmjrUcjzEsoyQlOaH
 rhe/whl272TQYdj95//BnqI899NVSNRYg6XXGlCB5TXqFscoDCW6JXvVAaTfB0Yg
 vMV7ZYX8auu2i013O51yoj8/ofNmOjqbX9eui+gJx6Xb6Zr9Ttma5woYRh14NXwd
 15KObGCd1LADpiOZ2XQ8Snlu8QlZ+PXr8RpLh9uSwDe7heemMRKqDZEf3AxfP3wO
 GUOK4EHfZ5kZQHlWLA3u59Zopo1ZJjL6EJUTG3Qk+n/Wob/S2F/v5IFIdyaEFTKI
 hrcTEQ/EmXZ9vc5Iw/LnIM49pO3kZXKQ9bSrZoi0kjk2AN6XBMmJNoYv/+huc2U9
 JiCcyM8olCWcSQnPGjoHWxBGLhxNXtR+WYu/tEEq3+D2PFdkfOap3ApP1qdi+JPd
 JFps/sOkgQ==
 =4+OJ
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.5'

release v0.20.5
2017-02-20 21:59:40 +01:00
Max Kellermann bc1c927952 util/TimeFormat: suppress -Wunused on Windows 2017-02-20 21:44:01 +01:00
François Revol 46aa4d2f91 haiku: fix build
Some missing bits when converted to C++ exceptions...
2017-02-20 11:25:00 +01:00
Max Kellermann 512e81c629 output/httpd: use emplace() instead of push() 2017-02-19 20:48:17 +01:00
Max Kellermann 452666f742 output/httpd: wake up the I/O thread only if pages have been read from encoder 2017-02-19 20:46:20 +01:00
Max Kellermann 72008d951b output/httpd: no mutex lock while reading data from encoder 2017-02-19 20:45:16 +01:00
Max Kellermann 72146e7800 output/httpd: use std::lock_guard 2017-02-19 20:43:45 +01:00
Max Kellermann f7af1bb8e2 output/httpd: cancel the DeferredMonitor in Close() 2017-02-19 20:41:34 +01:00
Max Kellermann f88f1fca3f output/httpd: move Close() lock into the I/O thread
Fixes a potential deadlock introduced by commit 945287358b
2017-02-19 20:41:06 +01:00
Max Kellermann 26e4a40cc7 output/httpd/Page: use std::shared_ptr instead of class RefCount 2017-02-19 20:17:57 +01:00
Max Kellermann 8b1931072a output/httpd/Page: no variable size, use AllocatedArray
Using variable-size objects is not worth the trouble here.  Let's drop
this and use existing and simpler code.
2017-02-19 20:13:41 +01:00
Max Kellermann 45e15b6cc6 output/httpd/Page: make all attributes private 2017-02-19 20:13:35 +01:00
Max Kellermann be7e52c882 output/httpd/Page: remove unused method Concat() 2017-02-19 20:13:19 +01:00
Max Kellermann 4162ce0bc5 output/httpd/Page: use uint8_t instead of unsigned char 2017-02-19 19:49:53 +01:00
Max Kellermann 7e46277016 Merge branch 'v0.20.x' 2017-02-19 19:46:18 +01:00
Max Kellermann f3b788703e tag/Handler: improve snprintf() return value check 2017-02-19 19:34:13 +01:00
Max Kellermann 4bb83781e8 output/httpd/IcyMetaDataServer: cast length to unsigned
Fixes another buffer overflow: if the stream has a very long title or
URL, resulting in a metadata string of more than 2 kB, icy_string[0]
is a negative value, which gets casted to size_t - ouch!

 https://bugs.musicpd.org/view.php?id=4652
2017-02-19 19:28:52 +01:00
Max Kellermann a73195b7cc output/httpd/IcyMetaDataServer: pad the string with 15 spaces
Fixes a buffer overflow due to the bad formula rounding the buffer
size up.  At the same time, remove the "+1" from the meta_length
calculation, which takes the padding into account and at the same time
implements proper rounding.
2017-02-19 19:27:37 +01:00
Max Kellermann 1bd00b8a9a output/httpd/IcyMetaDataServer: remove the int cast
Why did this cast exist??
2017-02-19 19:27:37 +01:00
Max Kellermann 3b84b99804 IdleFlags: add a "partition" event 2017-02-17 23:59:06 +01:00