From 8a40b1afa2ccf3708ce759d11d1ffab9fa6c826d Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 30 Apr 2013 11:08:58 +1000 Subject: [PATCH] Reduce log output Not getting a decoded frame isn't an error, so only display a message for debugging purposes. --- mythtv/libs/libmyth/audio/audiooutpututil.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mythtv/libs/libmyth/audio/audiooutpututil.cpp b/mythtv/libs/libmyth/audio/audiooutpututil.cpp index e9dfd5e98cd..6b28e4c7181 100644 --- a/mythtv/libs/libmyth/audio/audiooutpututil.cpp +++ b/mythtv/libs/libmyth/audio/audiooutpututil.cpp @@ -704,7 +704,7 @@ int AudioOutputUtil::DecodeAudio(AVCodecContext *ctx, data_size = 0; avcodec_get_frame_defaults(&frame); ret = avcodec_decode_audio4(ctx, &frame, &got_frame, pkt); - if (ret < 0 || !got_frame) + if (ret < 0) { LOG(VB_AUDIO, LOG_ERR, LOC + QString("audio decode error: %1 (%2)") @@ -713,6 +713,13 @@ int AudioOutputUtil::DecodeAudio(AVCodecContext *ctx, return ret; } + if (!got_frame) + { + LOG(VB_AUDIO, LOG_DEBUG, LOC + + QString("audio decode, no frame decoded (%1)").arg(ret)); + return ret; + } + AVSampleFormat format = (AVSampleFormat)frame.format; if (!av_sample_fmt_is_planar(format)) {