Guest User

Untitled

a guest
Mar 13th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. AVFormatContext* pFormatCtx = avformat_alloc_context();
  2. AVStream *st;
  3.  
  4. av_register_all();
  5. qDebug() << fname;
  6. int ret = avformat_open_input(&pFormatCtx, fname.toStdString().c_str(), NULL, NULL);
  7. if(ret < 0)
  8. perror("Issue is");
  9.  
  10. st = avformat_new_stream(pFormatCtx, 0);
  11.  
  12. if(!st) {
  13. fprintf(stderr, "Could not alloc stream\n");
  14. exit(1);
  15. }
  16.  
  17.  
  18. return true;
Add Comment
Please, Sign In to add comment