decode_picture() could return an error when an MPEG-4 profile is not
supported for example. In this case, the underlying VA context is not
allocated and no other proper action can be taken. Likewise on exit
from decode_slice().
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
}
else if (tos->type == GST_MPEG4_VIDEO_OBJ_PLANE) {
status = decode_picture(decoder, packet.data + packet.offset, packet.size);
+ if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
+ return status;
/* decode slice
* A resync marker shall only be located immediately before a macroblock
if (priv->vol_hdr.resync_marker_disable) {
status = decode_slice(decoder, _data, _data_size, FALSE);
+ if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
+ return status;
}
else {
// next start_code is required to determine the end of last slice