mxf: do not assert on the values of data read from input

Instead, log a warning, and return.

https://bugzilla.gnome.org/show_bug.cgi?id=563827
This commit is contained in:
Vincent Penquerc'h 2011-08-09 09:29:21 +01:00 committed by Sebastian Dröge
parent 6e4e4e107c
commit 2728ead8a2

View file

@ -6379,9 +6379,13 @@ mxf_descriptive_metadata_new (guint8 scheme, guint32 type,
_MXFDescriptiveMetadataScheme *s = NULL;
MXFDescriptiveMetadata *ret = NULL;
g_return_val_if_fail (type != 0, NULL);
g_return_val_if_fail (primer != NULL, NULL);
if (G_UNLIKELY (type == 0)) {
GST_WARNING ("Type 0 is invalid");
return NULL;
}
for (i = 0; i < _dm_schemes->len; i++) {
_MXFDescriptiveMetadataScheme *data =
&g_array_index (_dm_schemes, _MXFDescriptiveMetadataScheme, i);