undefined reference to `img_convert’的解决方法
2012-07-05 10:52
435 查看
ffmpeg4.0以上版本找不到img_convert,查了一下原因,才知道换成了sws_scale,
所以原来的
img_convert((AVPicture *)pFrameRGB, PIX_FMT_BGR24, (AVPicture*)pFrame,pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
应该改成:
所以原来的
img_convert((AVPicture *)pFrameRGB, PIX_FMT_BGR24, (AVPicture*)pFrame,pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
应该改成:
struct SwsContext *img_convert_ctx; if (img_convert_ctx == NULL) { img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height, PIX_FMT_YUV420P, sws_flags, NULL, NULL, NULL); if (img_convert_ctx == NULL) { fprintf(stderr, "Cannot initialize the conversion context/n"); exit(1); } } sws_scale(pthis->img_convert_ctx, pthis->pFrame->data, pthis->pFrame->linesize, 0, pthis->pCodecCtx->height, pthis->pFrameRGB->data, pthis->pFrameRGB->linesize);
相关文章推荐
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- undefined reference to 'pthread_create'的解决方法
- Linux makefile -- undefined reference to 问题解决方法
- "undefined reference to" 问题解决方法
- "undefined reference to" 问题解决方法
- "undefined reference to" 问题解决方法
- gcc "undefined reference to" 问题解决方法
- "undefined reference to" 问题解决方法
- 编译静态expect现undefined reference to `openpty' 错误解决方法
- 移植Qt-4.8.5出现undefined reference to '__sync_sub_and_fetch_4'解决方法--转载
- Linux下运行多线程——undefined reference to 'pthread_create'问题两种解决方法
- "undefined reference to" 问题解决方法
- undefined reference to 'pthread_create'解决方法
- "undefined reference to" 问题解决方法
- 关于android底层库编译出现“undefined reference to `__android_log_print'”的解决方法
- "undefined reference to" 问题解决方法
- "undefined reference to" 问题解决方法