You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: