Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling errors #37

Open
MikkTest opened this issue Jun 8, 2022 · 2 comments
Open

Compiling errors #37

MikkTest opened this issue Jun 8, 2022 · 2 comments

Comments

@MikkTest
Copy link

MikkTest commented Jun 8, 2022

Good day, dears.
Could you please advice me with following situation ?
After step 'Make' i got few errors:

Log:
segment.c:108:5: error: must use 'struct' tag to refer to type 'AVCodecContext'
AVCodecContext *codec_ctx;
^
struct
segment.c:111:15: warning: assigning to 'AVInputFormat *' (aka 'struct AVInputFormat *') from 'const struct AVInputFormat *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
seg->ifmt = fmt->iformat;
^ ~~~~~~~~~~~~
segment.c:129:34: error: cannot assign to non-static data member 'oformat' with const-qualified type 'const struct AVOutputFormat *'
seg->fmt_ctx->oformat->flags &= AVFMT_NOFILE;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavformat/avformat.h:1221:34: note: non-static data member 'oformat' declared const here
const struct AVOutputFormat *oformat;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
segment.c:137:25: error: implicit declaration of function 'avcodec_alloc_context3' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
codec_ctx = avcodec_alloc_context3(NULL);
^
segment.c:137:25: note: did you mean 'avio_alloc_context'?
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavformat/avio.h:409:14: note: 'avio_alloc_context' declared here
AVIOContext *avio_alloc_context(
^
segment.c:137:23: warning: incompatible integer to pointer conversion assigning to 'struct AVCodecContext *' from 'int' [-Wint-conversion]
codec_ctx = avcodec_alloc_context3(NULL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
segment.c:138:13: error: implicit declaration of function 'avcodec_parameters_to_context' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
avcodec_parameters_to_context(codec_ctx, in_stream->codecpar);
^
segment.c:138:13: note: did you mean 'avcodec_parameters_copy'?
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavcodec/codec_par.h:222:5: note: 'avcodec_parameters_copy' declared here
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src);
^
segment.c:139:69: error: incomplete definition of type 'struct AVCodecContext'
out_stream = avformat_new_stream(seg->fmt_ctx, codec_ctx->codec);
~~~~~~~~~^
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavcodec/codec.h:195:8: note: forward declaration of 'struct AVCodecContext'
struct AVCodecContext;
^
segment.c:141:13: error: implicit declaration of function 'avcodec_free_context' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
avcodec_free_context(&codec_ctx);
^
segment.c:141:13: note: did you mean 'avformat_free_context'?
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavformat/avformat.h:1903:6: note: 'avformat_free_context' declared here
void avformat_free_context(AVFormatContext *s);
^
2 warnings and 6 errors generated.
make: *** [segment.o] Error 1


How can i fix it? I have succesfully installed "ffmpeg" via Homebrew and not found "ffserver", and decided to install this software.

@redthing1
Copy link

I have this too.

@TheodoreAlenas
Copy link

Me too, something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants