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

 

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章