mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
decoder: fix mini object implementation on 64-bit systems.
Use GPOINTER_TO_SIZE() instead of GPOINTER_TO_UINT() while manipulating pointers. The latter is meant to be 32-bit only, not uintptr_t like size. Only a gsize can hold all bits of a pointer. Thanks to Ouping Zhang for spotting this error.
This commit is contained in:
parent
0ecb3a627b
commit
591b637cfc
1 changed files with 2 additions and 2 deletions
|
@ -32,14 +32,14 @@ struct _GstVaapiMiniObjectBase {
|
|||
static inline GstVaapiMiniObjectBase *
|
||||
object2base(GstVaapiMiniObject *object)
|
||||
{
|
||||
return GUINT_TO_POINTER(GPOINTER_TO_UINT(object) -
|
||||
return GSIZE_TO_POINTER(GPOINTER_TO_SIZE(object) -
|
||||
sizeof(GstVaapiMiniObjectBase));
|
||||
}
|
||||
|
||||
static inline GstVaapiMiniObject *
|
||||
base2object(GstVaapiMiniObjectBase *base_object)
|
||||
{
|
||||
return GUINT_TO_POINTER(GPOINTER_TO_UINT(base_object) +
|
||||
return GSIZE_TO_POINTER(GPOINTER_TO_SIZE(base_object) +
|
||||
sizeof(GstVaapiMiniObjectBase));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue