summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-27 19:17:29 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-27 19:17:29 +0100
commite113bad78b5e154f6dd2f4d9e160b8d15c90e124 (patch)
tree3d47b365041637fbdea1099d43d42e56b1e2e80b /modules
parent200dc84f9e1b15076e814b3090642d1871c86f51 (diff)
avformat: check ffmpeg version
Diffstat (limited to 'modules')
-rw-r--r--modules/avformat/avformat.c6
1 files changed, 6 insertions, 0 deletions
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 <libavformat/avformat.h>
#include <libavdevice/avdevice.h>
#include <libavcodec/avcodec.h>
+#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0)
#include <libavutil/pixdesc.h>
+#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++) {