mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
gst/mxf/mxfmetadata.*: If resolving a metadata object failed the first time return
Original commit message from CVS: * gst/mxf/mxfmetadata.c: (mxf_metadata_base_resolve): * gst/mxf/mxfmetadata.h: If resolving a metadata object failed the first time return FALSE for a second mxf_metadata_base_resolve() call instead of TRUE.
This commit is contained in:
parent
ed7bd1a9a3
commit
2169215a12
3 changed files with 25 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-12-22 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* gst/mxf/mxfmetadata.c: (mxf_metadata_base_resolve):
|
||||
* gst/mxf/mxfmetadata.h:
|
||||
If resolving a metadata object failed the first time return
|
||||
FALSE for a second mxf_metadata_base_resolve() call instead
|
||||
of TRUE.
|
||||
|
||||
2008-12-22 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* gst/mxf/mxf.c:
|
||||
|
|
|
@ -107,21 +107,28 @@ gboolean
|
|||
mxf_metadata_base_resolve (MXFMetadataBase * self, MXFMetadataBase ** metadata)
|
||||
{
|
||||
MXFMetadataBaseClass *klass;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
g_return_val_if_fail (MXF_IS_METADATA_BASE (self), FALSE);
|
||||
g_return_val_if_fail (metadata != NULL, FALSE);
|
||||
|
||||
if (self->resolved)
|
||||
if (self->resolved == MXF_METADATA_BASE_RESOLVE_STATE_SUCCESS)
|
||||
return TRUE;
|
||||
else if (self->resolved == MXF_METADATA_BASE_RESOLVE_STATE_FAILURE)
|
||||
return FALSE;
|
||||
|
||||
self->resolved = TRUE;
|
||||
|
||||
klass = MXF_METADATA_BASE_GET_CLASS (self);
|
||||
|
||||
if (klass->resolve)
|
||||
return klass->resolve (self, metadata);
|
||||
ret = klass->resolve (self, metadata);
|
||||
|
||||
return TRUE;
|
||||
self->resolved =
|
||||
(ret) ? MXF_METADATA_BASE_RESOLVE_STATE_SUCCESS :
|
||||
MXF_METADATA_BASE_RESOLVE_STATE_FAILURE;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (MXFMetadata, mxf_metadata, MXF_TYPE_METADATA_BASE);
|
||||
|
|
|
@ -333,13 +333,19 @@ typedef struct _MXFMetadataTextLocator MXFMetadataTextLocator;
|
|||
typedef MXFMetadataBaseClass MXFMetadataTextLocatorClass;
|
||||
GType mxf_metadata_text_locator_get_type (void);
|
||||
|
||||
typedef enum {
|
||||
MXF_METADATA_BASE_RESOLVE_STATE_NONE = 0,
|
||||
MXF_METADATA_BASE_RESOLVE_STATE_SUCCESS,
|
||||
MXF_METADATA_BASE_RESOLVE_STATE_FAILURE
|
||||
} MXFMetadataBaseResolveState;
|
||||
|
||||
struct _MXFMetadataBase {
|
||||
GstMiniObject parent;
|
||||
|
||||
MXFUL instance_uid;
|
||||
MXFUL generation_uid;
|
||||
|
||||
gboolean resolved;
|
||||
MXFMetadataBaseResolveState resolved;
|
||||
|
||||
GHashTable *other_tags;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue