summaryrefslogtreecommitdiffstats
path: root/src/picture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/picture.c')
-rw-r--r--src/picture.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/picture.c b/src/picture.c
index 2dab0df..2b30d99 100644
--- a/src/picture.c
+++ b/src/picture.c
@@ -174,6 +174,7 @@ VAStatus sunxi_cedrus_EndPicture(VADriverContextP ctx, VAContextID context)
struct v4l2_ext_control ctrl;
struct v4l2_ext_controls ctrls;
struct media_request_alloc request_alloc;
+ struct v4l2_ctrl_mpeg2_frame_hdr *frame_header;
object_config_p obj_config;
int rc;
@@ -209,6 +210,8 @@ int rc;
printf(">> %s: input buffer #%d, request fd %d, render target surface %d\n", __func__, obj_surface->index, obj_surface->request_fd, obj_context->current_render_target);
+ frame_header = obj_surface->header_data;
+
memset(plane, 0, sizeof(struct v4l2_plane));
memset(planes, 0, 2 * sizeof(struct v4l2_plane));
memset(&ctrl, 0, sizeof(struct v4l2_ext_control));
@@ -226,8 +229,7 @@ int rc;
case VAProfileMPEG2Main:
printf("%s: MPEG2 profile\n", __func__);
// obj_context->mpeg2_frame_hdr.slice_pos = 0;
- obj_context->mpeg2_frame_hdr.slice_len = obj_surface->slice_offset * 8;
-printf("%s: MPEG2 slice len total is %d\n", __func__, obj_context->mpeg2_frame_hdr.slice_len);
+ frame_header.slice_len = obj_surface->slice_offset * 8;
out_buf.m.planes[0].bytesused = obj_surface->slice_offset;
printf("%s: ending on %d bytes used\n", __func__, out_buf.m.planes[0].bytesused);
@@ -258,7 +260,7 @@ printf("%s: MPEG2 dummy/fallback non-profile\n", __func__);
memset(&(cap_buf), 0, sizeof(cap_buf));
cap_buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
cap_buf.memory = V4L2_MEMORY_MMAP;
- cap_buf.index = obj_surface->output_buf_index;
+ cap_buf.index = obj_surface->index;
cap_buf.length = 2;
cap_buf.m.planes = planes;
// FIXME: actual frame size here