Skip to content

msdkdec: set lockable flag

When postpone_free_surface is TRUE, the output buffer is not writable, however the base decoder needs a writable buffer as output buffer, otherwise it will make a copy of the output buffer. As the underlying memory is always lockable, so we may set the LOCKABLE flag for this buffer to avoid buffer copy in the base class.

The refcount of the output buffer is 1 when postpone_free_surface is FALSE, so needn't set the LOCKABLE flag for this case.

Merge request reports