Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- avformat_find_stream_info(pCtx->pFormatCtx, NULL);
- // Find the first video stream.
- for (unsigned int i = 0; i < pCtx->pFormatCtx->nb_streams; i++) {
- pCodecCtx = pCtx->pFormatCtx->streams[i]->codec;
- if (pCodecCtx->codec_type == AVMEDIA_TYPE_VIDEO) {
- // CODEC_TYPE_VIDEO replaced with AVMEDIA_TYPE_VIDEO
- // http://ffmpeg.org/pipermail/ffmpeg-cvslog/2011-February/034213.html
- pCtx->VideoStreamIdx = i;
- pCtx->pCodecCtx = pCodecCtx;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement