summaryrefslogtreecommitdiff
path: root/modules/mpa/decode.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-09-10 21:33:45 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-09-10 21:33:45 +0200
commit8fa77415960bc6811715e6182bfc2fe4ef434f67 (patch)
treeee85590a978c4b3a929247d53bde8b737a3577b0 /modules/mpa/decode.c
parent639c20bbf0085de7b5265c80ab29aba58fc371cb (diff)
use warning() instead of error()
ref https://github.com/alfredh/baresip/issues/295
Diffstat (limited to 'modules/mpa/decode.c')
-rw-r--r--modules/mpa/decode.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/mpa/decode.c b/modules/mpa/decode.c
index 8a92fbc..4e2a720 100644
--- a/modules/mpa/decode.c
+++ b/modules/mpa/decode.c
@@ -65,7 +65,7 @@ int mpa_decode_update(struct audec_state **adsp, const struct aucodec *ac,
ads->dec = mpg123_new(NULL,&result);
if (!ads->dec) {
- error("MPA dec create: %s\n",
+ warning("MPA dec create: %s\n",
mpg123_plain_strerror(result));
err = ENOMEM;
goto out;
@@ -77,7 +77,7 @@ int mpa_decode_update(struct audec_state **adsp, const struct aucodec *ac,
result = mpg123_param(ads->dec, MPG123_VERBOSE, 0, 0.);
#endif
if (result != MPG123_OK) {
- error("MPA dec param error %s\n",
+ warning("MPA dec param error %s\n",
mpg123_plain_strerror(result));
err = EINVAL;
goto out;
@@ -86,7 +86,7 @@ int mpa_decode_update(struct audec_state **adsp, const struct aucodec *ac,
result = mpg123_format_all(ads->dec);
if (result != MPG123_OK) {
- error("MPA dec format error %s\n",
+ warning("MPA dec format error %s\n",
mpg123_plain_strerror(result));
err = EINVAL;
goto out;
@@ -94,13 +94,12 @@ int mpa_decode_update(struct audec_state **adsp, const struct aucodec *ac,
result = mpg123_open_feed(ads->dec);
if (result != MPG123_OK) {
- error("MPA dec open feed error %s\n",
+ warning("MPA dec open feed error %s\n",
mpg123_plain_strerror(result));
err = EINVAL;
goto out;
}
-
out:
if (err)
mem_deref(ads);
@@ -128,7 +127,7 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
return EINVAL;
if (*(uint32_t*)(void *)buf != 0) {
- error("MPA dec header is not zero %08X, not supported yet\n",
+ warning("MPA dec header is not zero %08X, not supported yet\n",
*(uint32_t*)(void *)buf);
return EPROTO;
}
@@ -157,7 +156,8 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
3, &result);
if (result!=RESAMPLER_ERR_SUCCESS
|| ads->resampler==NULL) {
- error("MPA dec upsampler failed %d\n",result);
+ warning("MPA dec upsampler failed %d\n",
+ result);
return EINVAL;
}
}
@@ -167,7 +167,7 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
else if (result == MPG123_NEED_MORE)
; /* workaround: do nothing */
else if (result != MPG123_OK) {
- error("MPA dec feed error %d %s\n", result,
+ warning("MPA dec feed error %d %s\n", result,
mpg123_plain_strerror(result));
return EPROTO;
}
@@ -181,7 +181,7 @@ int mpa_decode_frm(struct audec_state *ads, int16_t *sampv, size_t *sampc,
ads->resampler, ads->intermediate_buffer,
&intermediate_len, sampv, &out_len);
if (result!=RESAMPLER_ERR_SUCCESS) {
- error("MPA dec upsample error: %s %d %d\n",
+ warning("MPA dec upsample error: %s %d %d\n",
strerror(result), out_len, *sampc/2);
return EPROTO;
}