Skip to content

Commit

Permalink
Reduce log output
Browse files Browse the repository at this point in the history
Not getting a decoded frame isn't an error, so only display a message for debugging purposes.
  • Loading branch information
jyavenard committed Apr 30, 2013
1 parent 709a6f6 commit 8a40b1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mythtv/libs/libmyth/audio/audiooutpututil.cpp
Expand Up @@ -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)")
Expand All @@ -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))
{
Expand Down

0 comments on commit 8a40b1a

Please sign in to comment.