Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2017
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. ffmpeg.ctx = avcodec_alloc_context3(codec);
  2. if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
  3. ffmpeg.ctx->flags |= AV_CODEC_FLAG_TRUNCATED;
  4.  
  5. //we can receive truncated frames
  6. ffmpeg.ctx->flags2 |= AV_CODEC_FLAG2_CHUNKS;
  7. ffmpeg.ctx->flags2 |= AV_CODEC_FLAG2_SHOW_ALL;
  8.  
  9. ffmpeg.ctx->thread_count = 1;
  10.  
  11. //prefer this as its our target format
  12. ffmpeg.ctx->pix_fmt = AV_PIX_FMT_NV12;
  13. ffmpeg.ctx->refcounted_frames = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement