st/vaapi: fix vaapi VC-1 simple/main corruption v2
authorBoyuan Zhang <boyuan.zhang@amd.com>
Wed, 23 Sep 2015 08:11:07 +0000 (10:11 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 6 Nov 2015 19:07:23 +0000 (20:07 +0100)
Apply the start code fix only to advanced profile.

v2 (chk): add commit message

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/va/picture.c

index d6cdbea197d2bc511e5cfc4a47901ae0b3d44236..5e7841a05210ee450ea860e3e4b38fdd21b07a76 100644 (file)
@@ -694,8 +694,10 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
           bufHasStartcode(buf, 0x0000010b, 32))
          break;
 
+      if (context->decoder->profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED) {
          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))