summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-04-18 22:16:59 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-04-18 22:16:59 +0200
commit352bd5799701299eeb1ec38509044b855cee3b11 (patch)
tree71eb7f05381fae03b30b2420faaacd0aa75c6039 /modules
parentb821c1b3293d61fd091e22f588dd5032b3bef8e4 (diff)
avcodec: fix building with libavcodec54:amd64
Diffstat (limited to 'modules')
-rw-r--r--modules/avcodec/decode.c6
-rw-r--r--modules/avcodec/encode.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/modules/avcodec/decode.c b/modules/avcodec/decode.c
index 7f2636b..affb855 100644
--- a/modules/avcodec/decode.c
+++ b/modules/avcodec/decode.c
@@ -13,6 +13,12 @@
#include "avcodec.h"
+#if LIBAVUTIL_VERSION_MAJOR < 52
+#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
+#define AV_PIX_FMT_NV12 PIX_FMT_NV12
+#endif
+
+
struct viddec_state {
AVCodec *codec;
AVCodecContext *ctx;
diff --git a/modules/avcodec/encode.c b/modules/avcodec/encode.c
index 20b497b..0ca635c 100644
--- a/modules/avcodec/encode.c
+++ b/modules/avcodec/encode.c
@@ -17,6 +17,7 @@
#if LIBAVUTIL_VERSION_MAJOR < 52
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
+#define AV_PIX_FMT_NV12 PIX_FMT_NV12
#endif
@@ -143,7 +144,7 @@ static int init_encoder(struct videnc_state *st)
static int open_encoder(struct videnc_state *st,
const struct videnc_param *prm,
const struct vidsz *size,
- enum AVPixelFormat pix_fmt)
+ int pix_fmt)
{
int err = 0;
@@ -587,7 +588,7 @@ int encode_x264(struct videnc_state *st, bool update,
int encode(struct videnc_state *st, bool update, const struct vidframe *frame)
{
int i, err, ret;
- enum AVPixelFormat pix_fmt;
+ int pix_fmt;
if (!st || !frame)
return EINVAL;