Commit 3de6ae86 authored by 崔华根's avatar 崔华根

fix

parent bdfcce0d
#include <iostream>
extern "C" {
#include <libavformat/avformat.h>
}
#include <string>
int main() {
std::cout << "Hello, World!" << std::endl;
AVFormatContext *pFormatContext = avformat_alloc_context();
std::string path ="/Users/gengen/Downloads/material-design/m1.mp4";
if(avformat_open_input(&pFormatContext, path.data(), NULL, NULL) != 0) {
std::cout << "open error" << std::endl;
return -1; // Couldn't open file
}
if (avformat_find_stream_info(pFormatContext, NULL) < 0) {
return -1; // Couldn't find stream information
}
av_dump_format(pFormatContext, 0, path.data(), 0);
// avformat_close_input(&pFormatContext);
return 0;
}
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