Skip to content

Video-decoder error during installation in mac #12

@codeAC29

Description

@codeAC29

I am getting the following error on my mac while installing the libvideo-decoder. ffmpeg version is 3-1-2.

video_decoder.c:2859:3: warning: implicit declaration of function 'avcodec_free_frame' is invalid in C99 [-Wimplicit-function-declaration]
                avcodec_free_frame(&enc.pFrame_yuv);
                ^
video_decoder.c:2865:9: warning: 'avcodec_encode_video2' is deprecated [-Wdeprecated-declarations]
                while(avcodec_encode_video2(enc.fmt_ctx->streams[0]->codec, &enc.pkt, 0, &got) >= 0 && got)
                      ^
/usr/local/include/libavcodec/avcodec.h:5261:5: note: 'avcodec_encode_video2' has been explicitly marked deprecated here
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
    ^
video_decoder.c:2865:56: warning: 'codec' is deprecated [-Wdeprecated-declarations]
                while(avcodec_encode_video2(enc.fmt_ctx->streams[0]->codec, &enc.pkt, 0, &got) >= 0 && got)
                                                                     ^
/usr/local/include/libavformat/avformat.h:880:21: note: 'codec' has been explicitly marked deprecated here
    AVCodecContext *codec;
                    ^
video_decoder.c:2875:4: warning: 'av_free_packet' is deprecated [-Wdeprecated-declarations]
                        av_free_packet(&enc.pkt);
                        ^
/usr/local/include/libavcodec/avcodec.h:4414:6: note: 'av_free_packet' has been explicitly marked deprecated here
void av_free_packet(AVPacket *pkt);
     ^
video_decoder.c:2880:42: warning: 'codec' is deprecated [-Wdeprecated-declarations]
                avcodec_close(enc.fmt_ctx->streams[0]->codec);
                                                       ^
/usr/local/include/libavformat/avformat.h:880:21: note: 'codec' has been explicitly marked deprecated here
    AVCodecContext *codec;
                    ^
79 warnings generated.
gcc -O3 -c -fpic -Wall -DDARWIN -I. -I/Users/abhi/torch/install/include mpjpeg.c
gcc video_decoder.o mpjpeg.o -shared -L/Users/abhi/torch/install/lib/lua/5.1 -L/Users/abhi/torch/install/lib -o libvideo_decoder.so -lavutil -lavformat -lavcodec -lswscale -lTH -lluajit -lluaT /usr/local/lib/libjpeg.dylib
Undefined symbols for architecture x86_64:
  "_avcodec_alloc_frame", referenced from:
      _video_decoder_init in video_decoder.o
      _video_decoder_rgb in video_decoder.o
      _encoderopen in video_decoder.o
  "_avcodec_free_frame", referenced from:
      _encoderclose in video_decoder.o
  "_avcodec_get_frame_defaults", referenced from:
      _video_decoder_batch_resized in video_decoder.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libvideo_decoder.so] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions