From b7ea91dc15af4ab872cd16cc93b3d6da2a15b6f6 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 12 Nov 2013 19:53:53 +0100 Subject: ffmpeg: backwards compat fix --- plugins/ffmpeg/ffmpeg.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/ffmpeg') diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index 00c53e86..0657a18c 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -97,7 +97,9 @@ typedef struct { AVCodecContext *ctx; AVFormatContext *fctx; AVPacket pkt; +#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53, 25, 0) AVFrame *frame; +#endif int stream_id; int left_in_packet; @@ -227,7 +229,9 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_playItem_t *it) { return -1; } +#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53, 25, 0) info->frame = avcodec_alloc_frame(); +#endif // fill in mandatory plugin fields _info->plugin = &plugin; @@ -269,9 +273,11 @@ ffmpeg_free (DB_fileinfo_t *_info) { trace ("ffmpeg: free\n"); ffmpeg_info_t *info = (ffmpeg_info_t*)_info; if (info) { +#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53, 25, 0) if (info->frame) { avcodec_free_frame(&info->frame); } +#endif if (info->buffer) { free (info->buffer); } -- cgit v1.2.3