summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-23 12:56:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-23 12:56:55 +0200
commitcc61ef0479f07ddb9f22cbf3fa9ca28d6fd0cf72 (patch)
treec65062a711988b3c44794d888daf92773cf8b59e /ffmpeg.c
parentd894e64acca98b091d503a8f61410c02c8e98b20 (diff)
parent42cc6cefd315c1556e2a52f7ebe2f766ec82b790 (diff)
Merge commit '42cc6cefd315c1556e2a52f7ebe2f766ec82b790'
* commit '42cc6cefd315c1556e2a52f7ebe2f766ec82b790': avconv: report the error for codec open failure Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 8ed4dafc44..3e8f231ffd 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1967,10 +1967,16 @@ static int init_input_stream(int ist_index, char *error, int error_len)
if (!av_dict_get(ist->opts, "threads", NULL, 0))
av_dict_set(&ist->opts, "threads", "auto", 0);
if ((ret = avcodec_open2(ist->st->codec, codec, &ist->opts)) < 0) {
+ char errbuf[128];
if (ret == AVERROR_EXPERIMENTAL)
abort_codec_experimental(codec, 0);
- snprintf(error, error_len, "Error while opening decoder for input stream #%d:%d",
- ist->file_index, ist->st->index);
+
+ av_strerror(ret, errbuf, sizeof(errbuf));
+
+ snprintf(error, error_len,
+ "Error while opening decoder for input stream "
+ "#%d:%d : %s",
+ ist->file_index, ist->st->index, errbuf);
return ret;
}
assert_avoptions(ist->opts);