aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vdpau_h264.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2014-03-20 08:53:16 +0100
committerAnton Khirnov <anton@khirnov.net>2014-03-20 16:59:46 +0100
commit7948a51b5c3d08e1a1173442a7ff72b220def303 (patch)
tree4abdb8bc18abd3cbcec525a5f958689107bd89c6 /libavcodec/vdpau_h264.c
parent82bb3048013201c0095d2853d4623633d912252f (diff)
downloadffmpeg-7948a51b5c3d08e1a1173442a7ff72b220def303.tar.gz
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 <anton@khirnov.net>
Diffstat (limited to 'libavcodec/vdpau_h264.c')
-rw-r--r--libavcodec/vdpau_h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c
index fd1c6e8cc6..c71d6b8db3 100644
--- a/libavcodec/vdpau_h264.c
+++ b/libavcodec/vdpau_h264.c
@@ -162,7 +162,7 @@ static int vdpau_h264_start_frame(AVCodecContext *avctx,
vdpau_h264_set_reference_frames(avctx);
- return ff_vdpau_common_start_frame(pic, buffer, size);
+ return ff_vdpau_common_start_frame(pic_ctx, buffer, size);
}
static const uint8_t start_code_prefix[3] = { 0x00, 0x00, 0x01 };
@@ -175,11 +175,11 @@ static int vdpau_h264_decode_slice(AVCodecContext *avctx,
struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
int val;
- val = ff_vdpau_add_buffer(pic, start_code_prefix, 3);
+ val = ff_vdpau_add_buffer(pic_ctx, start_code_prefix, 3);
if (val)
return val;
- val = ff_vdpau_add_buffer(pic, buffer, size);
+ val = ff_vdpau_add_buffer(pic_ctx, buffer, size);
if (val)
return val;