Building Error avcodec_send_packet
I would like to compile to following program: With the flages: -lavcodec -lavutil -lavfilter -lavformat -lswscale -lz #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" #include <stdio.h> // The flush packet is a non-NULL packet with size 0 and data NULL int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt) { int ret; *got_frame = 0; if (pkt) { ret = avcodec_send_packet(avctx, pkt); // In particular, we don't expect AVERROR(EAGAIN), because we read all // decoded frames with avcodec_receive_frame() until done. if (ret < 0) return ret == AVERROR_EOF ? 0 : ret; } ret = avcodec_receive_frame(avctx, frame); if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) return ret; if (ret >= 0) *got_frame = 1; return 0; } int main(int argc, char *argv[]) { return 0; But I receive: undefined reference to `avcodec_send_packet' undefined reference to `avcodec_receive_frame' ffmpeg version is: ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 Does some one know, Whats the problem? -- Yosef Alon
On Mon, Mar 27, 2017 at 11:41:48 +0300, יוסף אלון wrote:
I would like to compile to following program: With the flages: -lavcodec -lavutil -lavfilter -lavformat -lswscale -lz
You have now asked on ffmpeg-user and ffmpeg-devel. Both are the wrong mailing lists for questions regarding development using the ffmpeg-libraries. Please ask this sort of question on the list libav-user: https://ffmpeg.org/contact.html#MailingLists Thanks, Moritz
Thanks I just see the 2 mails. 2017-03-27 14:15 GMT+03:00 Moritz Barsnick <barsnick@gmx.net>:
On Mon, Mar 27, 2017 at 11:41:48 +0300, יוסף אלון wrote:
I would like to compile to following program: With the flages: -lavcodec -lavutil -lavfilter -lavformat -lswscale -lz
You have now asked on ffmpeg-user and ffmpeg-devel. Both are the wrong mailing lists for questions regarding development using the ffmpeg-libraries. Please ask this sort of question on the list libav-user:
https://ffmpeg.org/contact.html#MailingLists
Thanks, Moritz _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
-- בברכה, יוסף אלון 050-4916740
On Mon, Apr 03, 2017 at 11:46:03 +0300, יוסף אלון wrote:
Thanks I just see the 2 mails.
What are you reading? I see five listed there: ffmpeg-devel For discussions involving development of FFmpeg. Patches for FFmpeg should be submitted here. Make sure you are subscribed so you will receive comments and reviews for your patches. It is not for development of software that use the FFmpeg libraries and not for bug reports unless you are submitting a patch that fixes the problem. ffmpeg-user For general user questions and discussions involving the FFmpeg cli tools: ffmpeg, ffplay, ffprobe, and ffserver. libav-user For questions about using the FFmpeg libraries and API. ffmpeg-cvslog A log of all changes and updates made to the FFmpeg source. ffmpeg-trac Receives all bug reports, comments, and status changes made on the bug tracker. The third one, libav-user, is obviously the correct one for questions like yours. Moritz
participants (2)
-
Moritz Barsnick -
יוסף אלון