Commit 94f23747 authored by Tristan Matthews's avatar Tristan Matthews

video_decoder: improve error message

parent 3a1abc56
......@@ -74,10 +74,15 @@ int VideoDecoder::openInput(const std::string &source_str,
int ret = avformat_open_input(&inputCtx_, source_str.c_str(), iformat,
options_ ? &options_ : NULL);
if (ret)
ERROR("avformat_open_input failed (%d)", ret);
DEBUG("Using format %s", format_str.c_str());
if (ret) {
char errbuf[64];
av_strerror(ret, errbuf, sizeof(errbuf));
ERROR("avformat_open_input failed: %s", errbuf);
} else {
DEBUG("Using format %s", format_str.c_str());
}
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment