nginx-vod-module
nginx-vod-module copied to clipboard
Make error ‘av_init_packet’ is deprecated
I'm rebuilding the packager system with latest master and started to see these errors:
/home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c
/home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c: In function ‘audio_encoder_write_frame’:
/home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c:203:2: error: ‘av_init_packet’ is deprecated [-Werror=deprecated-declarations]
av_init_packet(&output_packet);
^~~~~~~~~~~~~~
In file included from /home/ec2-user/ffmpeg_build/include/libavcodec/bsf.h:30:0,
from /home/ec2-user/ffmpeg_build/include/libavcodec/avcodec.h:44,
from /home/ec2-user/nginx-vod-module/vod/filters/../input/../common.h:110,
from /home/ec2-user/nginx-vod-module/vod/filters/../input/read_cache.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/../input/frames_source.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/../media_format.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c:1:
/home/ec2-user/ffmpeg_build/include/libavcodec/packet.h:488:6: note: declared here
void av_init_packet(AVPacket *pkt);
^~~~~~~~~~~~~~
/home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c: In function ‘audio_encoder_flush’:
/home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c:247:3: error: ‘av_init_packet’ is deprecated [-Werror=deprecated-declarations]
av_init_packet(&output_packet);
^~~~~~~~~~~~~~
In file included from /home/ec2-user/ffmpeg_build/include/libavcodec/bsf.h:30:0,
from /home/ec2-user/ffmpeg_build/include/libavcodec/avcodec.h:44,
from /home/ec2-user/nginx-vod-module/vod/filters/../input/../common.h:110,
from /home/ec2-user/nginx-vod-module/vod/filters/../input/read_cache.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/../input/frames_source.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/../media_format.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.h:5,
from /home/ec2-user/nginx-vod-module/vod/filters/audio_encoder.c:1:
/home/ec2-user/ffmpeg_build/include/libavcodec/packet.h:488:6: note: declared here
void av_init_packet(AVPacket *pkt);
^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/filters/audio_encoder.o] Error 1
make[1]: Leaving directory `/home/ec2-user/nginx'
make: *** [build] Error 2
I'm on the latest build of the libraries:
libavutil 56. 72.100 / 56. 72.100
libavcodec 58.135.100 / 58.135.100
libavformat 58. 77.100 / 58. 77.100
libavdevice 58. 14.100 / 58. 14.100
libavfilter 7.111.100 / 7.111.100
libswscale 5. 10.100 / 5. 10.100
libswresample 3. 10.100 / 3. 10.100
libpostproc 55. 10.100 / 55. 10.100
Am I missing something or I should use some other version of the libraries?
Thanks
Looks like ffmpeg recently deprecated this API - https://github.com/FFmpeg/FFmpeg/commit/f7db77bd8785d1715d3e7ed7e69bd1cc991f2d07 I'll see when I have some time to handle this... until then you can try to use an older version
Thank you, will do.