Advertisement
Guest User

Untitled

a guest
Apr 26th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. if (!(pCtx->pFormatCtx = avformat_alloc_context())) {
  2. return; //error out of memory
  3. }
  4. //create avio context with read_packet function
  5. unsigned char* ffBuffer = (unsigned char*) av_malloc(
  6. pBufferCtx->iBufferSize);
  7.  
  8.  
  9. pCtx->pFormatCtx->pb = avio_alloc_context(ffBuffer, pBufferCtx->iBufferSize,
  10. 0, pBufferCtx, &read_packet, NULL, NULL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement