diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gst/mxf/mxfmetadata.c | 13 | ||||
-rw-r--r-- | gst/mxf/mxfmetadata.h | 8 |
3 files changed, 25 insertions, 4 deletions
@@ -1,5 +1,13 @@ 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: * gst/mxf/mxfaes-bwf.h: * gst/mxf/mxfd10.c: diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c index 88280d84..b360eaf5 100644 --- a/gst/mxf/mxfmetadata.c +++ b/gst/mxf/mxfmetadata.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); diff --git a/gst/mxf/mxfmetadata.h b/gst/mxf/mxfmetadata.h index 34512572..f0797572 100644 --- a/gst/mxf/mxfmetadata.h +++ b/gst/mxf/mxfmetadata.h @@ -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; }; |