Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auto codecCtx = avcodec_alloc_context3(codec);
- int err;
- codecCtx -> width = size.width();
- codecCtx -> height = size.height();
- codecCtx -> pix_fmt = format == JPEG ? AV_PIX_FMT_YUVJ420P : AV_PIX_FMT_RGBA;
- codecCtx -> time_base.num = 1;
- codecCtx -> time_base.den = 25;
- if ((err = avcodec_open2(codecCtx, codec, NULL)) == 0) { // Crashes here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement