Permalink
Browse files

Fix compilation issue on some systems.

This is to fix the error: "error: taking address of temporary array"
  • Loading branch information...
jyavenard committed Dec 13, 2012
1 parent eda2796 commit 1b2fb3c14714ebd5c26199e0ae733a6f352d6b7c
Showing with 5 additions and 3 deletions.
  1. +5 −3 mythtv/libs/libmyth/audio/audiooutpututil.cpp
@@ -697,6 +697,7 @@ int AudioOutputUtil::DecodeAudio(AVCodecContext *ctx,
AVFrame frame;
int got_frame = 0;
int ret, ret2;
char error[AV_ERROR_MAX_STRING_SIZE];
data_size = 0;
avcodec_get_frame_defaults(&frame);
@@ -705,7 +706,8 @@ int AudioOutputUtil::DecodeAudio(AVCodecContext *ctx,
{
LOG(VB_AUDIO, LOG_ERR, LOC +
QString("audio decode error: %1 (%2)")
.arg(av_err2str(ret)).arg(got_frame));
.arg(av_make_error_string(error, sizeof(error), ret))
.arg(got_frame));
return ret;
}
@@ -743,7 +745,7 @@ int AudioOutputUtil::DecodeAudio(AVCodecContext *ctx,
{
LOG(VB_AUDIO, LOG_ERR, LOC +
QString("error initializing resampler context (%1)")
.arg(av_err2str(ret2)));
.arg(av_make_error_string(error, sizeof(error), ret2)));
swr_free(&swr);
return ret2;
}
@@ -756,7 +758,7 @@ int AudioOutputUtil::DecodeAudio(AVCodecContext *ctx,
{
LOG(VB_AUDIO, LOG_ERR, LOC +
QString("error converting audio from planar format (%1)")
.arg(av_err2str(ret2)));
.arg(av_make_error_string(error, sizeof(error), ret2)));
return ret2;
}
data_size = ret2 * frame.channels * av_get_bytes_per_sample(format);

0 comments on commit 1b2fb3c

Please sign in to comment.