Skip to content

Instantly share code, notes, and snippets.

@cfeckardt
Created December 17, 2013 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfeckardt/0877ce3b15c26fc06e00 to your computer and use it in GitHub Desktop.
Save cfeckardt/0877ce3b15c26fc06e00 to your computer and use it in GitHub Desktop.
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