From e113bad78b5e154f6dd2f4d9e160b8d15c90e124 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Tue, 27 Dec 2016 19:17:29 +0100 Subject: avformat: check ffmpeg version --- modules/avformat/avformat.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/avformat/avformat.c b/modules/avformat/avformat.c index 9767303..ae450c8 100644 --- a/modules/avformat/avformat.c +++ b/modules/avformat/avformat.c @@ -15,7 +15,9 @@ #include #include #include +#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0) #include +#endif /** @@ -145,6 +147,7 @@ static void handle_packet(struct vidsrc_st *st, AVPacket *pkt) return; } +#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0) switch (frame->format) { case AV_PIX_FMT_YUV420P: @@ -158,6 +161,9 @@ static void handle_packet(struct vidsrc_st *st, AVPacket *pkt) av_get_pix_fmt_name(frame->format)); goto out; } +#else + vf.fmt = VID_FMT_YUV420P; +#endif vf.size = sz; for (i=0; i<4; i++) { -- cgit v1.2.3