diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-01-10 20:18:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-10 23:54:14 +0100 |
commit | 23bc1351ad7db698da9348e23ee63ec7300a881d (patch) | |
tree | 6e50b10be503cc1f757b6aeb011d0543ec5dc7bc /libavcodec/vdpau_h264.c | |
parent | a1ed1c2193483849df689b105bec0d26c2497999 (diff) | |
download | ffmpeg-23bc1351ad7db698da9348e23ee63ec7300a881d.tar.gz |
vdpau: restore compatibility with deprecated fields in AVVDPAUContext
Fixes ticket #3133.
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Tested-by: EricV
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vdpau_h264.c')
-rw-r--r-- | libavcodec/vdpau_h264.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c index 3f6415d4f8..ea69c147f1 100644 --- a/libavcodec/vdpau_h264.c +++ b/libavcodec/vdpau_h264.c @@ -195,6 +195,15 @@ static int vdpau_h264_end_frame(AVCodecContext *avctx) struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; VdpVideoSurface surf = ff_vdpau_get_surface_id(pic); +#if FF_API_BUFS_VDPAU +FF_DISABLE_DEPRECATION_WARNINGS + hwctx->info = pic_ctx->info; + hwctx->bitstream_buffers = pic_ctx->bitstream_buffers; + hwctx->bitstream_buffers_used = pic_ctx->bitstream_buffers_used; + hwctx->bitstream_buffers_allocated = pic_ctx->bitstream_buffers_allocated; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + if (!hwctx->render) { res = hwctx->render2(avctx, &pic->f, (void *)&pic_ctx->info, pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers); @@ -205,6 +214,14 @@ static int vdpau_h264_end_frame(AVCodecContext *avctx) ff_h264_draw_horiz_band(h, 0, h->avctx->height); av_freep(&pic_ctx->bitstream_buffers); +#if FF_API_BUFS_VDPAU +FF_DISABLE_DEPRECATION_WARNINGS + hwctx->bitstream_buffers = NULL; + hwctx->bitstream_buffers_used = 0; + hwctx->bitstream_buffers_allocated = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + return res; } |