summaryrefslogtreecommitdiff
path: root/plugins/ffmpeg
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-12 19:53:53 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-12 19:53:53 +0100
commitb7ea91dc15af4ab872cd16cc93b3d6da2a15b6f6 (patch)
tree5a2b80e022bfe138f4601e766266489593ad7c39 /plugins/ffmpeg
parentc03f9d198049b09a0dd944da7a581f1836b07947 (diff)
ffmpeg: backwards compat fix
Diffstat (limited to 'plugins/ffmpeg')
-rw-r--r--plugins/ffmpeg/ffmpeg.c6
1 files changed, 6 insertions, 0 deletions
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);
}