From: Antonio Ospite Date: Wed, 28 Feb 2018 11:48:31 +0000 (+0100) Subject: am7xxx-play: use AVStream.codecpar instead of the deprecated AVStream.codec X-Git-Tag: v0.1.7~12 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/8aa04859fc68aeab28d08a1c7d97ef5a0f7ce050?hp=8aa04859fc68aeab28d08a1c7d97ef5a0f7ce050 am7xxx-play: use AVStream.codecpar instead of the deprecated AVStream.codec AVStream.codec has been deprecated and AVStream.codecpar should be used instead, as shown in: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commitdiff;h=9200514ad8717c63f82101dc394f4378854325bf The changes fix the following compilation warnings: .../libam7xxx/examples/am7xxx-play.c: In function ‘video_input_init’: .../libam7xxx/examples/am7xxx-play.c:104:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] if (input_format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { ^~ In file included from /usr/include/x86_64-linux-gnu/libavdevice/avdevice.h:51:0, from .../libam7xxx/examples/am7xxx-play.c:32: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:893:21: note: declared here AVCodecContext *codec; ^~~~~ .../libam7xxx/examples/am7xxx-play.c:115:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] input_codec_ctx = input_format_ctx->streams[video_index]->codec; ^~~~~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/libavdevice/avdevice.h:51:0, from .../libam7xxx/examples/am7xxx-play.c:32: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:893:21: note: declared here AVCodecContext *codec; ^~~~~ ---