From 7948a51b5c3d08e1a1173442a7ff72b220def303 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 20 Mar 2014 08:53:16 +0100 Subject: vdpau: don't assume Picture and H264Picture are the same The code passed H264Picture* and Picture*, and assumed the hwaccel_picture_private field was in the same place in both structs. Somehow this happened to work in Libav, but broke in FFmpeg (and probably subtly breaks in Libav too). Signed-off-by: Anton Khirnov --- libavcodec/vdpau_vc1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/vdpau_vc1.c') diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c index b40135283d..01ad0aebac 100644 --- a/libavcodec/vdpau_vc1.c +++ b/libavcodec/vdpau_vc1.c @@ -89,7 +89,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, info->deblockEnable = v->postprocflag & 1; info->pquant = v->pq; - return ff_vdpau_common_start_frame(pic, buffer, size); + return ff_vdpau_common_start_frame(pic_ctx, buffer, size); } static int vdpau_vc1_decode_slice(AVCodecContext *avctx, @@ -101,7 +101,7 @@ static int vdpau_vc1_decode_slice(AVCodecContext *avctx, struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; int val; - val = ff_vdpau_add_buffer(pic, buffer, size); + val = ff_vdpau_add_buffer(pic_ctx, buffer, size); if (val < 0) return val; -- cgit v1.2.3