summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/vdpau.c8
-rw-r--r--libavcodec/vdpau_h264.c6
-rw-r--r--libavcodec/vdpau_internal.h5
-rw-r--r--libavcodec/vdpau_mpeg12.c4
-rw-r--r--libavcodec/vdpau_mpeg4.c4
-rw-r--r--libavcodec/vdpau_vc1.c4
6 files changed, 15 insertions, 16 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 50a57d0970..5d83b449e8 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -38,12 +38,10 @@
* @{
*/
-int ff_vdpau_common_start_frame(Picture *pic,
+int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic_ctx,
av_unused const uint8_t *buffer,
av_unused uint32_t size)
{
- struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
-
pic_ctx->bitstream_buffers_allocated = 0;
pic_ctx->bitstream_buffers_used = 0;
pic_ctx->bitstream_buffers = NULL;
@@ -71,9 +69,9 @@ int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
}
#endif
-int ff_vdpau_add_buffer(Picture *pic, const uint8_t *buf, uint32_t size)
+int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx,
+ const uint8_t *buf, uint32_t size)
{
- struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
VdpBitstreamBuffer *buffers = pic_ctx->bitstream_buffers;
buffers = av_fast_realloc(buffers, &pic_ctx->bitstream_buffers_allocated,
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;
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index 50c4f5e74c..94c81ff78e 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -70,9 +70,10 @@ struct vdpau_picture_context {
VdpBitstreamBuffer *bitstream_buffers;
};
-int ff_vdpau_common_start_frame(Picture *pic,
+int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic,
const uint8_t *buffer, uint32_t size);
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx);
-int ff_vdpau_add_buffer(Picture *pic, const uint8_t *buf, uint32_t buf_size);
+int ff_vdpau_add_buffer(struct vdpau_picture_context *pic, const uint8_t *buf,
+ uint32_t buf_size);
#endif /* AVCODEC_VDPAU_INTERNAL_H */
diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c
index 426d58075b..e62901adb1 100644
--- a/libavcodec/vdpau_mpeg12.c
+++ b/libavcodec/vdpau_mpeg12.c
@@ -75,7 +75,7 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx,
info->non_intra_quantizer_matrix[i] = s->inter_matrix[i];
}
- return ff_vdpau_common_start_frame(pic, buffer, size);
+ return ff_vdpau_common_start_frame(pic_ctx, buffer, size);
}
static int vdpau_mpeg_decode_slice(AVCodecContext *avctx,
@@ -86,7 +86,7 @@ static int vdpau_mpeg_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;
diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c
index 17205fe317..f328e484ae 100644
--- a/libavcodec/vdpau_mpeg4.c
+++ b/libavcodec/vdpau_mpeg4.c
@@ -77,8 +77,8 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx,
info->non_intra_quantizer_matrix[i] = s->inter_matrix[i];
}
- ff_vdpau_common_start_frame(pic, buffer, size);
- return ff_vdpau_add_buffer(pic, buffer, size);
+ ff_vdpau_common_start_frame(pic_ctx, buffer, size);
+ return ff_vdpau_add_buffer(pic_ctx, buffer, size);
}
static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx,
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;