diff options
author | Alfred E. Heggestad <aeh@db.org> | 2016-05-16 10:12:22 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2016-05-16 10:12:22 +0200 |
commit | 03a4547060883c6e8b47a73d0fad327b9ab5751c (patch) | |
tree | a18d9095391259736dac9f557f049b68888af825 /modules/avcodec/decode.c | |
parent | fca553b1fa485b1a5c152a23c95ed33ab4b0a2ab (diff) |
avcodec: build with older ffmpeg versions
Debian 6.0 (libavcodec 52.20.1)
Debian 7.9 (libavcodec 54.59.100)
Diffstat (limited to 'modules/avcodec/decode.c')
-rw-r--r-- | modules/avcodec/decode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/avcodec/decode.c b/modules/avcodec/decode.c index c7f0213..c686a63 100644 --- a/modules/avcodec/decode.c +++ b/modules/avcodec/decode.c @@ -7,14 +7,18 @@ #include <rem.h> #include <baresip.h> #include <libavcodec/avcodec.h> +#include <libavutil/avutil.h> #include <libavutil/mem.h> +#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0) #include <libavutil/pixdesc.h> +#endif #include "h26x.h" #include "avcodec.h" #if LIBAVUTIL_VERSION_MAJOR < 52 #define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P +#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P #define AV_PIX_FMT_NV12 PIX_FMT_NV12 #endif @@ -175,6 +179,7 @@ static int ffdecode(struct viddec_state *st, struct vidframe *frame, if (got_picture) { +#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0) switch (st->pict->format) { case AV_PIX_FMT_YUV420P: @@ -189,7 +194,9 @@ static int ffdecode(struct viddec_state *st, struct vidframe *frame, av_get_pix_fmt_name(st->pict->format)); goto out; } - +#else + frame->fmt = VID_FMT_YUV420P; +#endif for (i=0; i<4; i++) { frame->data[i] = st->pict->data[i]; |