Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const char * filename = url.c_str();
if(int errnum = avformat_open_input(&avFormatPtr, filename, NULL, NULL) != 0) {
size_t errsz = 256;
char * errbuf = new char[errsz];
errnum = AVERROR(errnum);
av_strerror(errnum, errbuf, errsz);
const char * str = url.c_str();
printf("Failed to open file: %s with error: %d %s", str, errnum, errbuf);
delete [] errbuf;
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment