Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. avformat_find_stream_info(pCtx->pFormatCtx, NULL);
  2.  
  3. // Find the first video stream.
  4.  
  5. for (unsigned int i = 0; i < pCtx->pFormatCtx->nb_streams; i++) {
  6. pCodecCtx = pCtx->pFormatCtx->streams[i]->codec;
  7. if (pCodecCtx->codec_type == AVMEDIA_TYPE_VIDEO) {
  8. // CODEC_TYPE_VIDEO replaced with AVMEDIA_TYPE_VIDEO
  9. // http://ffmpeg.org/pipermail/ffmpeg-cvslog/2011-February/034213.html
  10. pCtx->VideoStreamIdx = i;
  11. pCtx->pCodecCtx = pCodecCtx;
  12. break;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement