Skip to content

Instantly share code, notes, and snippets.

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment