diff options
author | Zhao, Yakui <yakui.zhao@intel.com> | 2014-05-26 08:40:15 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-06-16 11:53:35 +0800 |
commit | ee4b8c3ec1e5b5f126d8bdb7021eb15630de751e (patch) | |
tree | 689b7765345fccf78caf38e1c3ee47ceca292cef /src | |
parent | 89507c06c7ed03d829cf2526e621d844e174c90c (diff) | |
download | libva-intel-driver-ee4b8c3ec1e5b5f126d8bdb7021eb15630de751e.tar.gz libva-intel-driver-ee4b8c3ec1e5b5f126d8bdb7021eb15630de751e.tar.bz2 libva-intel-driver-ee4b8c3ec1e5b5f126d8bdb7021eb15630de751e.zip |
H264_encoding: Reset the last_packed_header_type to avoid the unpaired packed header type/data
After adding the support of inserting the packed rawdata, more group of packed header data
can be passed. In order to insert the packed rawdata correctly, the packed header type/
data should be paired.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit fd78866bd64d7ab57fe8cb0c4b25e8357973b0b1)
Diffstat (limited to 'src')
-rwxr-xr-x | src/i965_drv_video.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index d8b50dc..cf42b68 100755 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -2508,7 +2508,11 @@ i965_encoder_render_picture(VADriverContextP ctx, case VAEncPackedHeaderDataBufferType: { - + if (encode->last_packed_header_type == 0) { + WARN_ONCE("the packed header data is passed without type!\n"); + vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER; + return vaStatus; + } if (encode->last_packed_header_type == VAEncPackedHeaderRawData) { vaStatus = I965_RENDER_ENCODE_BUFFER(packed_header_data_ext); if (vaStatus == VA_STATUS_SUCCESS) { @@ -2531,6 +2535,7 @@ i965_encoder_render_picture(VADriverContextP ctx, obj_buffer, va_enc_packed_type_to_idx(encode->last_packed_header_type)); } + encode->last_packed_header_type = 0; break; } |