Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1.         auto codecCtx = avcodec_alloc_context3(codec);
  2.         int err;
  3.  
  4.         codecCtx -> width = size.width();
  5.         codecCtx -> height = size.height();
  6.         codecCtx -> pix_fmt = format == JPEG ? AV_PIX_FMT_YUVJ420P : AV_PIX_FMT_RGBA;
  7.         codecCtx -> time_base.num = 1;
  8.         codecCtx -> time_base.den = 25;
  9.  
  10.         if ((err = avcodec_open2(codecCtx, codec, NULL)) == 0) {  // Crashes here
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement