Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffmpeg.ctx = avcodec_alloc_context3(codec);
- if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
- ffmpeg.ctx->flags |= AV_CODEC_FLAG_TRUNCATED;
- //we can receive truncated frames
- ffmpeg.ctx->flags2 |= AV_CODEC_FLAG2_CHUNKS;
- ffmpeg.ctx->flags2 |= AV_CODEC_FLAG2_SHOW_ALL;
- ffmpeg.ctx->thread_count = 1;
- //prefer this as its our target format
- ffmpeg.ctx->pix_fmt = AV_PIX_FMT_NV12;
- ffmpeg.ctx->refcounted_frames = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement