Undefined symbols for architecture x86_64: "_av_format_close_input"

chents:Test chents$ clang -g -o mediainfo mediainfo.c `pkg-config --libs libavutil libavformat`
mediainfo.c:22:2: warning: implicit declaration of function 'av_format_close_input' is invalid in C99
      [-Wimplicit-function-declaration]
        av_format_close_input(&fmt_ctx);
        ^
1 warning generated.
Undefined symbols for architecture x86_64:
  "_av_format_close_input", referenced from:
      _main in mediainfo-c5c981.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

刚开始执行错误,报错在close_input

后来注释掉,在编译运行就好了

 

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './hhh.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : www.aliyun.com - Media Transcoding
  Duration: 00:01:00.09, bitrate: N/A
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 960x540, 984 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, 2 channels, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

 

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值