0
点赞
收藏
分享

微信扫一扫

VS编译VLC源码 升级FFmpeg版本源码修改记录总结

前言

目前采用FFmpeg作为VLC插件plugins中,avcodec的解码器


未定义标识符 FF_INPUT_BUFFER_PADDING_SIZE

AV_INPUT_BUFFER_PADDING_SIZE替代FF_INPUT_BUFFER_PADDING_SIZE

AV_CODEC_FLAG_GRAY替代CODEC_FLAG_GRAY

AV_CODEC_FLAG_OUTPUT_CORRUPT 替代CODEC_FLAG_OUTPUT_CORRUPT

AV_PIX_FMT_NONE替代PIX_FMT_NONE

AV_INPUT_BUFFER_MIN_SIZE替代FF_MIN_BUFFER_SIZE

AV_CODEC_FLAG_LOW_DELAY替代CODEC_FLAG_LOW_DELAY

FF_MAX_B_FRAMES 未声明的标识符

通过VA助手,在原有的代码上搜索到相关的定义

#ifndef  FF_MAX_B_FRAMES
# define  FF_MAX_B_FRAMES 16 // FIXME: remove this
#endif

直接用16替换掉即可

未定义标识符 CODEC_FLAG_EMU_EDGE

暂时屏蔽掉

/* libavcodec doesn't properly release old pictures when frames are skipped */
    //if( p_sys->b_hurry_up ) p_sys->b_direct_rendering = false;
    if( p_sys->b_direct_rendering )
    {
        msg_Dbg( p_dec, "trying to use direct rendering" );
        //p_sys->p_context->flags |= CODEC_FLAG_EMU_EDGE;
    }
    else
    {
        msg_Dbg( p_dec, "direct rendering is disabled" );
}

struct "AVCodecContext" 没有字段"border_masking"  

struct "AVCodecContext" 没有字段 "lmin"

struct "AVCodecContext" 没有字段 "lmax"  

struct "AVCodecContext" 没有字段 "rc_qsquish"

struct "AVCodecContext" 没有字段 "rc_buffer_aggressivity"

删除相关的赋值,修改后类似如下:

p_context->border_masking = p_sys->f_border_masking;

无法解析的外部符号 _avcodec_alloc_frame

av_frame_alloc替换avcodec_alloc_frame

无法解析的外部符号 _avcodec_get_frame_defaults

av_frame_unref替换avcodec_get_frame_defaults

无法解析的外部符号 _avcodec_free_frame

av_frame_free替换avcodec_free_frame

举报

相关推荐

0 条评论