Compile error with avcodec under Ubuntu 14.04.3 LTS
After some errors trying to compile from GIT I did a new clone and got this error when compiling:
codec/avcodec/encoder.c: In function ‘OpenEncoder’:
codec/avcodec/encoder.c:306:59: error: ‘PIX_FMT_NONE’ undeclared (first use in this function)
if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE )
^
codec/avcodec/encoder.c:306:59: note: each undeclared identifier is reported only once for each function it appears in
codec/avcodec/encoder.c:517:9: warning: ‘border_masking’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:1869) [-Wdeprecated-declarations]
p_context->border_masking = p_sys->f_border_masking;
^
codec/avcodec/encoder.c:564:37: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
p_context->intra_matrix = mpeg4_default_intra_matrix;
^
codec/avcodec/encoder.c:565:37: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
p_context->inter_matrix = mpeg4_default_non_intra_matrix;
^
codec/avcodec/encoder.c:630:13: warning: ‘lmin’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2303) [-Wdeprecated-declarations]
p_context->mb_lmin = p_context->lmin = p_sys->i_qmin * FF_QP2LAMBDA;
^
codec/avcodec/encoder.c:635:13: warning: ‘lmax’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2309) [-Wdeprecated-declarations]
p_context->mb_lmax = p_context->lmax = p_sys->i_qmax * FF_QP2LAMBDA;
^
codec/avcodec/encoder.c:648:13: warning: ‘rc_qsquish’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2200) [-Wdeprecated-declarations]
p_context->rc_qsquish = 1.0;
^
codec/avcodec/encoder.c:662:13: warning: ‘rc_buffer_aggressivity’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2250) [-Wdeprecated-declarations]
p_context->rc_buffer_aggressivity = p_sys->f_rc_buffer_aggressivity;
^
codec/avcodec/encoder.c:799:17: warning: ‘lmin’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2303) [-Wdeprecated-declarations]
p_context->mb_lmin = p_context->lmin = 10 * FF_QP2LAMBDA;
^
codec/avcodec/encoder.c:805:17: warning: ‘lmax’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2309) [-Wdeprecated-declarations]
p_context->mb_lmax = p_context->lmax = 42 * FF_QP2LAMBDA;
^
codec/avcodec/encoder.c:811:17: warning: ‘lmin’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2303) [-Wdeprecated-declarations]
p_context->mb_lmin = p_context->lmin = FF_QP2LAMBDA;
^
codec/avcodec/encoder.c:1006:5: error: implicit declaration of function ‘avcodec_alloc_frame’ [-Werror=implicit-function-declaration]
p_sys->frame = avcodec_alloc_frame();
^
codec/avcodec/encoder.c:1006:18: warning: assignment makes pointer from integer without a cast [enabled by default]
p_sys->frame = avcodec_alloc_frame();
^
codec/avcodec/encoder.c: In function ‘EncodeVideo’:
codec/avcodec/encoder.c:1076:9: error: implicit declaration of function ‘avcodec_get_frame_defaults’ [-Werror=implicit-function-declaration]
avcodec_get_frame_defaults( frame );
^
codec/avcodec/encoder.c:1099:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( p_sys->b_hurry_up && frame->pts != AV_NOPTS_VALUE )
^
codec/avcodec/encoder.c:1136:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( ( frame->pts != AV_NOPTS_VALUE ) && ( frame->pts != VLC_TS_INVALID ) )
^
codec/avcodec/encoder.c:1179:5: warning: ‘coded_frame’ is deprecated (declared at /BUILD/vlc/contrib/x86_64-linux-gnu/include/libavcodec/avcodec.h:2646) [-Wdeprecated-declarations]
switch ( p_sys->p_context->coded_frame->pict_type )
^
In file included from codec/avcodec/encoder.c:37:0:
codec/avcodec/encoder.c: In function ‘encode_audio_buffer’:
codec/avcodec/encoder.c:1226:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( likely( packet.pts != AV_NOPTS_VALUE ) )
^
../include/vlc_common.h:115:44: note: in definition of macro ‘likely’
# define likely(p) __builtin_expect(!!(p), 1)
^
codec/avcodec/encoder.c: In function ‘handle_delay_buffer’:
codec/avcodec/encoder.c:1246:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( likely( p_sys->frame->pts != AV_NOPTS_VALUE) )
^
../include/vlc_common.h:115:44: note: in definition of macro ‘likely’
# define likely(p) __builtin_expect(!!(p), 1)
^
codec/avcodec/encoder.c:1264:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( likely( p_sys->frame->pts != AV_NOPTS_VALUE) )
^
../include/vlc_common.h:115:44: note: in definition of macro ‘likely’
# define likely(p) __builtin_expect(!!(p), 1)
^
codec/avcodec/encoder.c:1268:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(unlikely( ( (leftover + buffer_delay) < p_sys->i_buffer_out ) &&
^
../include/vlc_common.h:116:44: note: in definition of macro ‘unlikely’
# define unlikely(p) __builtin_expect(!!(p), 0)
^
codec/avcodec/encoder.c: In function ‘EncodeAudio’:
codec/avcodec/encoder.c:1396:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( likely( p_sys->frame->pts != AV_NOPTS_VALUE) )
^
../include/vlc_common.h:115:44: note: in definition of macro ‘likely’
# define likely(p) __builtin_expect(!!(p), 1)
^
codec/avcodec/encoder.c: In function ‘CloseEncoder’:
codec/avcodec/encoder.c:1424:5: error: implicit declaration of function ‘avcodec_free_frame’ [-Werror=implicit-function-declaration]
avcodec_free_frame( &p_sys->frame );
^
cc1: some warnings being treated as errors
make[4]: *** [codec/avcodec/libavcodec_plugin_la-encoder.lo] Error 1
make[4]: Leaving directory `/BUILD/vlc/modules'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/BUILD/vlc/modules'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/BUILD/vlc/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/BUILD/vlc'
make: *** [all] Error 2
I'm using the contrib/native method for adding libraries to VLC, as I've been doing a year now under Ubuntu 14.04.3 LTS. I don't know if this is related to my system or maybe is introduced by some git commit lately.
Thank you