打开视频文件
av_register_all();//注册初始化
char *path = VOIDIO_NAME;
AVFormatContext *ic = NULL;
int re = avformat_open_input(&ic, path, NULL, NULL);
if (re == 0){
qDebug() << "file time = " << (int)(ic->duration / AV_TIME_BASE / 60) << ":" << (int)(ic->duration / AV_TIME_BASE) % 60;
avformat_close_input(&ic);
}
else{
qDebug() << "open fail";
}