summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad_mpg123.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 18:23:59 +0100
committerwm4 <wm4@nowhere>2013-12-21 20:50:12 +0100
commit1974c9b49d7bf09469362ef6ba1214f625ecb40a (patch)
treed670f2a12652f2f98531905e388f1290ebbee126 /audio/decode/ad_mpg123.c
parent4abe6b862f07d4d2dfa75791c9fdd97ccbc8aeaa (diff)
downloadmpv-1974c9b49d7bf09469362ef6ba1214f625ecb40a.tar.bz2
mpv-1974c9b49d7bf09469362ef6ba1214f625ecb40a.tar.xz
audio: mp_msg conversions
Diffstat (limited to 'audio/decode/ad_mpg123.c')
-rw-r--r--audio/decode/ad_mpg123.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c
index 57f84e136f..4d4fd52862 100644
--- a/audio/decode/ad_mpg123.c
+++ b/audio/decode/ad_mpg123.c
@@ -115,10 +115,10 @@ static int preinit(struct dec_audio *da)
bad_end:
if (!con->handle)
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "mpg123 preinit error: %s\n",
+ MP_ERR(da, "mpg123 preinit error: %s\n",
mpg123_plain_strerror(err));
else
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "mpg123 preinit error: %s\n",
+ MP_ERR(da, "mpg123 preinit error: %s\n",
mpg123_strerror(con->handle));
uninit(da);
@@ -156,8 +156,7 @@ static int set_format(struct dec_audio *da)
int af = mpg123_format_to_af(encoding);
if (!af) {
/* This means we got a funny custom build of libmpg123 that only supports an unknown format. */
- mp_msg(MSGT_DECAUDIO, MSGL_ERR,
- "Bad encoding from mpg123: %i.\n", encoding);
+ MP_ERR(da, "Bad encoding from mpg123: %i.\n", encoding);
return MPG123_ERR;
}
mp_audio_set_format(&da->decoded, af);
@@ -236,9 +235,9 @@ static int init(struct dec_audio *da, const char *decoder)
fail:
if (ret == MPG123_NEED_MORE) {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "Could not find mp3 stream.\n");
+ MP_ERR(da, "Could not find mp3 stream.\n");
} else {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "mpg123 init error: %s\n",
+ MP_ERR(da, "mpg123 init error: %s\n",
mpg123_strerror(con->handle));
}
@@ -337,7 +336,7 @@ static int decode_audio(struct dec_audio *da, struct mp_audio *buffer, int maxle
return 0;
mpg123_fail:
- mp_msg(MSGT_DECAUDIO, MSGL_ERR, "mpg123 decoding error: %s\n",
+ MP_ERR(da, "mpg123 decoding error: %s\n",
mpg123_strerror(con->handle));
return -1;
}
@@ -351,8 +350,7 @@ static int control(struct dec_audio *da, int cmd, void *arg)
mpg123_close(con->handle);
if (mpg123_open_feed(con->handle) != MPG123_OK) {
- mp_msg(MSGT_DECAUDIO, MSGL_ERR,
- "mpg123 failed to reopen stream: %s\n",
+ MP_ERR(da, "mpg123 failed to reopen stream: %s\n",
mpg123_strerror(con->handle));
return CONTROL_FALSE;
}