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;
^~~~~