diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-22 20:37:24 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-22 20:37:24 +0000 |
commit | 2169215a12b9fb7bb13d9d66141e140b97115515 (patch) | |
tree | b5edc8fec6ca23fe5afff5c2654f460736d26624 | |
parent | ed7bd1a9a343e51a915e9a4d9c6eec072bc87031 (diff) | |
download | gst-plugins-bad-2169215a12b9fb7bb13d9d66141e140b97115515.tar.gz gst-plugins-bad-2169215a12b9fb7bb13d9d66141e140b97115515.tar.bz2 gst-plugins-bad-2169215a12b9fb7bb13d9d66141e140b97115515.zip |
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.
-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; }; |