[FFmpeg-user] FFmpeg 3 example compilation error

seaguest tyhk1987 at gmail.com
Tue May 10 03:52:14 CEST 2016


Hello everyone,

I am trying the example for FFmpeg 3, but I get the following error:

seaguest at DEV:~/ffmpeg_sources/FFmpeg/doc/examples$ make all
cc -I/usr/local/include -Wall -g   -c -o muxing.o muxing.c
muxing.c: In function ‘open_audio’:
muxing.c:250:11: warning: implicit declaration of function 
‘avcodec_parameters_from_context’ [-Wimplicit-function-declaration]
      ret = avcodec_parameters_from_context(ost->st->codecpar, c);
            ^
muxing.c:250:50: error: ‘AVStream {aka struct AVStream}’ has no member 
named ‘codecpar’
      ret = avcodec_parameters_from_context(ost->st->codecpar, c);
                                                   ^
muxing.c: In function ‘open_video’:
muxing.c:432:50: error: ‘AVStream {aka struct AVStream}’ has no member 
named ‘codecpar’
      ret = avcodec_parameters_from_context(ost->st->codecpar, c);
                                                   ^
<builtin>: recipe for target 'muxing.o' failed
make: *** [muxing.o] Error 1


It said the AVStream doesn't have the codecpar member, but I checked the 
avformat.h, I do see the codecpar in AVStream, could anyone help?

best regards

Yongkan


More information about the ffmpeg-user mailing list