diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 5d83b449e819cba1f299d81582a535c7563a44f1..5ad5d060b6f1c648f6de9da4f2b06a68217372dd 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -57,7 +57,7 @@ int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx) MpegEncContext *s = avctx->priv_data; Picture *pic = s->current_picture_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; - VdpVideoSurface surf = ff_vdpau_get_surface_id(pic); + VdpVideoSurface surf = ff_vdpau_get_surface_id(&pic->f); hwctx->render(hwctx->decoder, surf, (void *)&pic_ctx->info, pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers); diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c index c71d6b8db34fe4d6423a86b96538dddd9b8f06c0..7aa17efc29ad6b59c382fc762fcf9cbc7aaa0f41 100644 --- a/libavcodec/vdpau_h264.c +++ b/libavcodec/vdpau_h264.c @@ -50,7 +50,7 @@ static void vdpau_h264_clear_rf(VdpReferenceFrameH264 *rf) static void vdpau_h264_set_rf(VdpReferenceFrameH264 *rf, H264Picture *pic, int pic_structure) { - VdpVideoSurface surface = ff_vdpau_get_surface_id(pic); + VdpVideoSurface surface = ff_vdpau_get_surface_id(&pic->f); if (pic_structure == 0) pic_structure = pic->reference; @@ -87,7 +87,7 @@ static void vdpau_h264_set_reference_frames(AVCodecContext *avctx) if (!pic || !pic->reference) continue; pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; - surface_ref = ff_vdpau_get_surface_id(pic); + surface_ref = ff_vdpau_get_surface_id(&pic->f); rf2 = &info->referenceFrames[0]; while (rf2 != rf) { @@ -193,7 +193,7 @@ static int vdpau_h264_end_frame(AVCodecContext *avctx) H264Context *h = avctx->priv_data; H264Picture *pic = h->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; - VdpVideoSurface surf = ff_vdpau_get_surface_id(pic); + VdpVideoSurface surf = ff_vdpau_get_surface_id(&pic->f); hwctx->render(hwctx->decoder, surf, (void *)&pic_ctx->info, pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers); diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h index 94c81ff78ebae66985c15075a3cea2e0695edccd..2443e0a91172ce7bb4f7848ea37426da7a21ff92 100644 --- a/libavcodec/vdpau_internal.h +++ b/libavcodec/vdpau_internal.h @@ -31,10 +31,10 @@ #include "mpegvideo.h" #include "version.h" -/** Extract VdpVideoSurface from a Picture */ -static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic) +/** Extract VdpVideoSurface from an AVFrame */ +static inline uintptr_t ff_vdpau_get_surface_id(AVFrame *pic) { - return (uintptr_t)pic->f.data[3]; + return (uintptr_t)pic->data[3]; } #if !FF_API_BUFS_VDPAU diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c index e62901adb18a1f96897684cdd1ee43b636ef22c3..0f92cef97088bbaa9cafb4bee9d4f3cf5caa395f 100644 --- a/libavcodec/vdpau_mpeg12.c +++ b/libavcodec/vdpau_mpeg12.c @@ -43,12 +43,12 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, switch (s->pict_type) { case AV_PICTURE_TYPE_B: - ref = ff_vdpau_get_surface_id(&s->next_picture); + ref = ff_vdpau_get_surface_id(&s->next_picture.f); assert(ref != VDP_INVALID_HANDLE); info->backward_reference = ref; /* fall through to forward prediction */ case AV_PICTURE_TYPE_P: - ref = ff_vdpau_get_surface_id(&s->last_picture); + ref = ff_vdpau_get_surface_id(&s->last_picture.f); info->forward_reference = ref; } diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c index f328e484ae99c8589d26244829aee88b9b69dfd9..3c6c8b3f3464f10b6c0a77280e0e6293c51bbfd1 100644 --- a/libavcodec/vdpau_mpeg4.c +++ b/libavcodec/vdpau_mpeg4.c @@ -46,13 +46,13 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, switch (s->pict_type) { case AV_PICTURE_TYPE_B: - ref = ff_vdpau_get_surface_id(&s->next_picture); + ref = ff_vdpau_get_surface_id(&s->next_picture.f); assert(ref != VDP_INVALID_HANDLE); info->backward_reference = ref; info->vop_coding_type = 2; /* fall-through */ case AV_PICTURE_TYPE_P: - ref = ff_vdpau_get_surface_id(&s->last_picture); + ref = ff_vdpau_get_surface_id(&s->last_picture.f); assert(ref != VDP_INVALID_HANDLE); info->forward_reference = ref; } diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c index 01ad0aebacce23087b8adf7849b6028e241b9a95..392c511ac89987af6e07d4d1f50cf2173b230190 100644 --- a/libavcodec/vdpau_vc1.c +++ b/libavcodec/vdpau_vc1.c @@ -44,12 +44,12 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, switch (s->pict_type) { case AV_PICTURE_TYPE_B: - ref = ff_vdpau_get_surface_id(&s->next_picture); + ref = ff_vdpau_get_surface_id(&s->next_picture.f); assert(ref != VDP_INVALID_HANDLE); info->backward_reference = ref; /* fall-through */ case AV_PICTURE_TYPE_P: - ref = ff_vdpau_get_surface_id(&s->last_picture); + ref = ff_vdpau_get_surface_id(&s->last_picture.f); assert(ref != VDP_INVALID_HANDLE); info->forward_reference = ref; }