Advertisement
Guest User

Untitled

a guest
May 25th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. AVFrame *frame_for_encoding = recycled_frame_.get();
  2. av_frame_unref(frame_for_encoding);
  3.  
  4. frame_for_encoding->format = AV_PIX_FMT_YUV420P;
  5.  
  6. frame_for_encoding->width = image->width();
  7. frame_for_encoding->height = image->height();
  8. frame_for_encoding->chroma_location = AVCHROMA_LOC_LEFT;
  9.  
  10. // in loop
  11. frame_for_encoding->buf[i] = buffer->buffer_ref();
  12. frame_for_encoding->data[i] = frame_for_encoding->buf[i]->data;
  13. frame_for_encoding->linesize[i] = buffer->linesize();
  14.  
  15. // Buf at 0 has linesize: 896
  16. // Buf at 1 has linesize: 448
  17. // Buf at 2has linesize: 448
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement