summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2011-12-23 22:08:51 +0100
committerJohns <johns98@gmx.net>2011-12-23 22:08:51 +0100
commita8259bec6510396f032490b79e609c0c4939957e (patch)
treef52c9c3f4876662de28950cda87f25c58aee5621
parent58800f57f66207f2fd17ef841b1ebe6bb18dc5bb (diff)
downloadvdr-plugin-softhddevice-a8259bec6510396f032490b79e609c0c4939957e.tar.gz
vdr-plugin-softhddevice-a8259bec6510396f032490b79e609c0c4939957e.tar.bz2
Fix libav compatibility.
-rw-r--r--codec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/codec.c b/codec.c
index ea8d8f8..6605a40 100644
--- a/codec.c
+++ b/codec.c
@@ -128,7 +128,7 @@ static int Codec_get_buffer(AVCodecContext * video_ctx, AVFrame * frame)
struct vdpau_render_state *vrs;
surface = VideoGetSurface(decoder->HwDecoder);
- vrs = av_calloc(1, sizeof(struct vdpau_render_state));
+ vrs = av_mallocz(sizeof(struct vdpau_render_state));
vrs->surface = surface;
//Debug(3, "codec: use surface %#010x\n", surface);
@@ -229,6 +229,11 @@ static void Codec_release_buffer(AVCodecContext * video_ctx, AVFrame * frame)
return avcodec_default_release_buffer(video_ctx, frame);
}
+/// libav: compatibility hack
+#ifndef AV_NUM_DATA_POINTERS
+#define AV_NUM_DATA_POINTERS 4
+#endif
+
/**
** Draw a horizontal band.
**