From 81b6c0d77bc377a26906fe66fb11f51a6247be0a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Feb 2009 21:44:14 +0100 Subject: 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. --- NEWS | 1 + src/decoder/ffmpeg_plugin.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 424c5ead3..d0d94f221 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ ver 0.15 - (200?/??/??) 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 ba3355ee7..80cc00a5e 100644 --- a/src/decoder/ffmpeg_plugin.c +++ b/src/decoder/ffmpeg_plugin.c @@ -243,10 +243,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, -- cgit v1.2.3