mpeg2: fix decoding of multiple slices with same slice_vertical_position.

6.3.15 says that "some slices may have the same slice_vertical_position,
since slices may start and finish anywhere". So, we can't submit the current
picture to the HW right away since subsequent slices would be missing.
This commit is contained in:
Gwenole Beauchesne 2012-02-23 11:19:48 +01:00
parent de7432f712
commit d47031b8ce

View file

@ -577,7 +577,6 @@ decode_slice(
GstVaapiPicture * const picture = priv->current_picture;
GstVaapiSlice *slice;
VASliceParameterBufferMPEG2 *slice_param;
GstVaapiDecoderStatus status;
GstBitReader br;
guint8 slice_vertical_position_extension;
guint8 quantiser_scale_code;
@ -633,14 +632,6 @@ decode_slice(
slice_param->slice_vertical_position = priv->mb_y;
slice_param->quantiser_scale_code = quantiser_scale_code;
slice_param->intra_slice_flag = intra_slice;
/* Commit picture for decoding if we reached the last slice */
if (++priv->mb_y >= priv->mb_height) {
status = decode_current_picture(decoder);
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
return status;
GST_DEBUG("done");
}
return GST_VAAPI_DECODER_STATUS_SUCCESS;
failed: