1. 03 Feb, 2009 3 commits
    • Max Kellermann's avatar
      ffmpeg: fixed seek integer overflow · 824d299e
      Max Kellermann authored
      The "current" variable is used for calculating the seek destination,
      and was declared as "int".  With very long song files, the 32 bit
      integer can overflow.  ffmpeg expects an int64_t, which is very
      unlikely to overflow.  Switch to int64_t.
      824d299e
    • Max Kellermann's avatar
      ffmpeg: check if the time stamp is valid · f3b73b82
      Max Kellermann authored
      When ffmpeg cannot estimate the elapsed time, it sets
      AVPacket.pts=AV_NOPTS_VALUE.  Our ffmpeg decoder plugin did not check
      for that special value.
      f3b73b82
    • Max Kellermann's avatar
      ffmpeg: don't warn of empty packet output · 81b6c0d7
      Max Kellermann authored
      If avcodec_decode_audio2() returns no output for an AVPacket,
      libavcodec may buffer some data, and return a larger chunk of output
      later.  This patch disables a lot of bogus warnings.
      81b6c0d7
  2. 02 Feb, 2009 2 commits
    • Max Kellermann's avatar
      shout_mp3: call lame_close() in clear_encoder() method · 3b0a78fe
      Max Kellermann authored
      The shout_mp3 encoder had two bugs: when no song was ever played, MPD
      segfaulted during cleanup.  Second bug: memory leak, each time the
      shout device was opened, lame_init() was called again, and
      lame_close() is only called once during shutdown.
      
      Fix this by shutting down LAME each time the clear_encoder() method is
      called.
      3b0a78fe
    • Max Kellermann's avatar
      player_thread: set player error when output device fails · 4b7c28f9
      Max Kellermann authored
      When the output device fails to play a chunk, set pc.error to
      PLAYER_ERROR_AUDIO.  This way, the playlist knows that it should not
      queue the next song.
      4b7c28f9
  3. 30 Jan, 2009 4 commits
    • Matthias Drochner's avatar
      mikmod: call MikMod_Exit() only in the finish() method · 5b852886
      Matthias Drochner authored
      Hi -
      independently of libmikmod's other problems - there seems
      to be a problem in mpd's wrapper: MikMod_Exit() is called
      after the first file is decoded, which frees some ressources
      within the mikmod library. An attempt to play a second file
      leads to a crash. The appended patch fixes this for me.
      (I don't know what the "dup" entry is good for - someone
      who knows should review that too.)
      best regards
      Matthias
      
      [mk: removed 3 more MikMod_Exit() invocations]
      5b852886
    • Max Kellermann's avatar
      wavpack: pass NULL if the .wvc file fails to open · 02bfb0c4
      Max Kellermann authored
      The wavpack library seems to use the .wvc stream even if the OPEN_WVC
      flag is not set.  In this case, pass NULL to be sure libwavpack won't
      use it.
      02bfb0c4
    • Max Kellermann's avatar
      mapper: remove trailing slashes from music_directory · e3d4fa69
      Max Kellermann authored
      When the user configures a music_directory with a trailing slash, it
      may break playlist loading, because MPD expects a double slash.  Chop
      off the trailing slash.
      e3d4fa69
    • David Horn's avatar
      ffmeg: added support for the tags comment, genre, year · efb04532
      David Horn authored
      ffmpeg_tag_internal() does not look for a few tags that mpd
      supports. Most noteably:
      
       comment -> TAG_ITEM_COMMENT -> Description
       genre -> TAG_ITEM_GENRE -> WM/Genre (not WM/GenreID)
       year -> TAG_ITEM_DATE -> WM/Year
      
      I *think* that this is the last of the tags that AVFormatContext() in
      ffmpeg supports that mpd also uses.
      efb04532
  4. 29 Jan, 2009 5 commits
    • Max Kellermann's avatar
      added support for the MMS protocol · caa4d28f
      Max Kellermann authored
      This patch implements the MMS protocol, by using libmms.  It is quite
      experimental: it does not support seeking yet, and it is currently
      using synchronous I/O, which causes MPD to hang while waiting for the
      server.
      caa4d28f
    • Max Kellermann's avatar
      jack: reduced sleep time to 1ms · a7326696
      Max Kellermann authored
      When waiting for free space in the ring buffer, the JACK plugin
      sleeped 10ms until there is enough space.  This delay was too large
      for low-latency setups (<10ms), and created a lot of xruns.  Work
      around that by reducing the sleep time to 1ms.
      
      A proper solution for this would be to use an event based approach,
      and we will do it, just not now.
      a7326696
    • Max Kellermann's avatar
      jack: clear "shutdown" flag on reconnect · 1e0ceb3d
      Max Kellermann authored
      When the connection failed once, you had to restart MPD, because it
      never cleared the jack_data.shutdown flag.  Instead, it refused to
      play anything "because there is no client thread" (which is wrong at
      that point).
      1e0ceb3d
    • Max Kellermann's avatar
      jack: allocate ring buffers before connecting · 3a070d3d
      Max Kellermann authored
      If the ring buffers are allocated after jack_activate(),
      mpd_jack_process() might segfault because it attempts to access them.
      3a070d3d
    • Avuton Olrich's avatar
      9ef6c799
  5. 24 Jan, 2009 1 commit
  6. 23 Jan, 2009 1 commit
  7. 22 Jan, 2009 3 commits
  8. 18 Jan, 2009 3 commits
  9. 17 Jan, 2009 1 commit
    • Max Kellermann's avatar
      oggvorbis: disable seeking on remote songs · d83eff80
      Max Kellermann authored
      When libvorbis knows that a song is seekable, it seeks around like
      crazy in the file before starting to decode it.  This is very
      expensive on remote HTTP resources, and delays MPD for 10 or 20
      seconds.
      
      This patch disables seeking on remote songs, because the advantages of
      quickly playing a song seem to weigh more than the theoretical ability
      of seeking for most MPD users.  If users feel this feature is needed,
      we will make a configuration option for that.
      d83eff80
  10. 16 Jan, 2009 1 commit
  11. 15 Jan, 2009 4 commits
  12. 14 Jan, 2009 1 commit
    • Max Kellermann's avatar
      playlist: safely search the playlist for deleted song · 2c540ee8
      Max Kellermann authored
      When a song file is deleted during database update, all pointers to it
      must be removed from the playlist.  The "for" loop in
      deleteASongFromPlaylist() did not deal with multiple copies of the
      deleted song properly, and left instances of the (to-be-invalidated)
      pointer in.  Fix this by reversing the loop.
      2c540ee8
  13. 13 Jan, 2009 1 commit
    • Joe Milbourn's avatar
      input_curl: honour http_proxy_* config directives · 45598d50
      Joe Milbourn authored
      If http_proxy_{host, port, user, password} are provided in mpd.conf
      they are not passed on to libcurl. As a result mpd cannot stream from
      behind an http proxy.
      
      The attached patch `http_proxy.patch` makes the relevant calls to
      curl_easy_setopt(...) for all proxy configuration parameters, but is
      only tested for host and port.
      45598d50
  14. 04 Jan, 2009 2 commits
    • Max Kellermann's avatar
      don't exit after --create-db · e4a53df7
      Max Kellermann authored
      Start the daemon after --create-db.  This makes --create-db a flag
      which discards the old database and starts with a fresh one.
      e4a53df7
    • Max Kellermann's avatar
      player_thread: fix cross-fading duplicate chunk bug · 55b6fd2f
      Max Kellermann authored
      When the decoder of the new song is not fast enough, the player thread
      has to wait for it for a moment.  However the variable "nextChunk" was
      reset to -1 during that, making the next loop iteration assume that
      cross-fading has not begun yet.  This patch overwrites it with "0"
      while waiting.
      55b6fd2f
  15. 03 Jan, 2009 3 commits
  16. 01 Jan, 2009 1 commit
  17. 31 Dec, 2008 1 commit
  18. 28 Dec, 2008 3 commits