Replace avcodec_open with avcodec_open2. Now requires libavcodec 53.6.0 or newer.
done
fi
LAVF_LIBS="-L. $LAVF_LIBS"
- if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_open_input(0,0,0,0);" ; then
+ if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_open_input(0,0,0,0); avcodec_open2(0,0,0);" ; then
if [ "$swscale" = "yes" ]; then
lavf="yes"
else
/* lavf is thread unsafe as calling av_read_frame invalidates previously read AVPackets */
info->thread_safe = 0;
h->vfr_input = info->vfr;
- FAIL_IF_ERROR( avcodec_open( c, avcodec_find_decoder( c->codec_id ) ),
+ FAIL_IF_ERROR( avcodec_open2( c, avcodec_find_decoder( c->codec_id ), NULL ),
"could not find decoder for video stream\n" )
/* prefetch the first frame and set/confirm flags */