summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/picture.c
diff options
context:
space:
mode:
authorMichael Varga <[email protected]>2014-10-23 10:45:20 -0500
committerLeo Liu <[email protected]>2014-11-10 10:24:07 -0500
commit9d6253cf823276c09f2639cb70b37b1e9347ed59 (patch)
tree246147d68c08b066d7bb2c4130a88dc0f2548962 /src/gallium/state_trackers/va/picture.c
parentd335f5ffa6d5db0c439ad96889bdf677fabcfde7 (diff)
st/va: MPEG4 call vlVaDecoderFixMPEG4Startcode()
If the VOP and GOV headers were truncated they will be regenerated. Signed-off-by: Michael Varga <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/picture.c')
-rw-r--r--src/gallium/state_trackers/va/picture.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
index 7107231fa72..9b94b397b07 100644
--- a/src/gallium/state_trackers/va/picture.c
+++ b/src/gallium/state_trackers/va/picture.c
@@ -503,6 +503,13 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
buffers[num_buffers] = (void *const)&start_code_vc1;
sizes[num_buffers++] = sizeof(start_code_vc1);
break;
+ case PIPE_VIDEO_FORMAT_MPEG4:
+ if (bufHasStartcode(buf, 0x000001, 24))
+ break;
+
+ vlVaDecoderFixMPEG4Startcode(context);
+ buffers[num_buffers] = (void *)context->mpeg4.start_code;
+ sizes[num_buffers++] = context->mpeg4.start_code_size;
default:
break;
}