aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-11-24 16:05:14 +0100
committerClément Bœsch <ubitux@gmail.com>2011-11-24 16:55:45 +0100
commit0232f788b6b0855db1771dbf8d7174e2eda2ff45 (patch)
tree6f42092574d4c4bf818529dc0dad3c2f5fe54129
parent58205edcc67f606f13f2bc4571e5f5bd61eaef05 (diff)
downloadffmpeg-0232f788b6b0855db1771dbf8d7174e2eda2ff45.tar.gz
swr: fix invalid sample format message.
If the sample format is invalid, av_get_sample_fmt_name() will always return NULL.
-rw-r--r--libswresample/swresample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 831bae005c..0575f7dead 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -149,11 +149,11 @@ int swr_init(struct SwrContext *s){
s->out_sample_fmt= av_get_alt_sample_fmt(s->out_sample_fmt, 0);
if(s-> in_sample_fmt >= AV_SAMPLE_FMT_NB){
- av_log(s, AV_LOG_ERROR, "Requested sample format %s is invalid\n", av_get_sample_fmt_name(s->in_sample_fmt));
+ av_log(s, AV_LOG_ERROR, "Requested input sample format %d is invalid\n", s->in_sample_fmt);
return AVERROR(EINVAL);
}
if(s->out_sample_fmt >= AV_SAMPLE_FMT_NB){
- av_log(s, AV_LOG_ERROR, "Requested sample format %s is invalid\n", av_get_sample_fmt_name(s->out_sample_fmt));
+ av_log(s, AV_LOG_ERROR, "Requested output sample format %d is invalid\n", s->out_sample_fmt);
return AVERROR(EINVAL);
}