1、发现错误
error LNK2019: Unknown external token "int __cdecl av_open_input_file(struct AVFormatContext * *,char const *,struct AVInputFormat *,int,struct AVFormatParameters *)"
必须要用external "C"{...}把头文件包含起来
2、img_convert ->sws_scale
#if 0 //old code:
img_convert(&pict, dst_pix_fmt,
(AVPicture *)pFrame, is->video_st->codec->pix_fmt,
is->video_st->codec->width, is->video_st->codec->height);
#else //new code:
static int sws_flags = SWS_BICUBIC;
struct SwsContext *img_convert_ctx;
img_convert_ctx = sws_getContext(is->video_st->codec->width,
is->video_st->codec->height,
is->video_st->codec->pix_fmt,
is->video_st->codec->width,
is->video_st->codec->height,
dst_pix_fmt,
sws_flags, NULL, NULL, NULL);
sws_scale (img_convert_ctx, pFrame->data, pFrame->linesize,
0, is->video_st->codec->height,
pict.data,pict.linesize);
sws_freeContext(img_convert_ctx);
#endif
#include <swscale.h>
3、iconv
The iconv program converts text from one encoding to another encoding.
iconv [OPTION...] [-f encoding] [-t encoding] [inputfile ...]
iconv -l
examples:
(1)iconv -f ISO-8859-1 -t UTF-8
converts input from the old West-European encoding ISO-8859-1 to Unicode.
(2)iconv -f KOI8-R --byte-subst="<0x%x>"
--unicode-subst="<U+%04X>"
converts input from the old Russian encoding KOI8-R to the locale encoding, substituting an angle bracket notation with hexadecimal numbers for invalid bytes and for valid but unconvertible characters.
(3)iconv --list
lists the supported encodings.
ffmpeg编译问题及其解决方法
最新推荐文章于 2024-09-19 09:55:01 发布