aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-03 21:44:14 +0100
committerMax Kellermann <max@duempel.org>2009-02-03 21:44:14 +0100
commite3ca024b0f65e512c738f9acdc56fc371616c9f8 (patch)
tree4db51f9352921a78b0fa2240bb9aca696cc676a0
parent5a5bf78a25b2cc170d4232d58653e0db4b8d61b5 (diff)
downloadmpd-e3ca024b0f65e512c738f9acdc56fc371616c9f8.tar.gz
mpd-e3ca024b0f65e512c738f9acdc56fc371616c9f8.tar.xz
mpd-e3ca024b0f65e512c738f9acdc56fc371616c9f8.zip
ffmpeg: don't warn of empty packet output
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.
-rw-r--r--NEWS1
-rw-r--r--src/decoder/ffmpeg_plugin.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index c68a9189e..9d6e546a5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
ver 0.14.2 (2009/??/??)
* decoders:
- ffmpeg: added support for the tags comment, genre, year
+ - ffmpeg: don't warn of empty packet output
- wavpack: pass NULL if the .wvc file fails to open
- mikmod: call MikMod_Exit() only in the finish() method
* audio outputs:
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index c85485297..127b75c26 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -241,10 +241,9 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
packet_data += len;
packet_size -= len;
- if (audio_size <= 0) {
- g_message("no audio frame\n");
+ if (audio_size <= 0)
continue;
- }
+
cmd = decoder_data(decoder, is,
audio_buf, audio_size,
position,