validate: media-descriptor: handle proper return values

while comparing the media descriptor with --expected-results, the return
values are not being handled properly, which results in wrong comparision

https://bugzilla.gnome.org/show_bug.cgi?id=748390
This commit is contained in:
Vineeth TM 2015-07-24 15:36:27 +09:00 committed by Nicolas Dufresne
parent bd5fb7be26
commit 8d477c6d93
2 changed files with 6 additions and 3 deletions

View file

@ -358,7 +358,7 @@ gst_media_descriptors_compare (GstMediaDescriptor * ref,
} }
} }
if (sfound == FALSE) { if (sfound == -1) {
GST_VALIDATE_REPORT (ref, FILE_PROFILE_INCORRECT, GST_VALIDATE_REPORT (ref, FILE_PROFILE_INCORRECT,
"Could not find stream %s in the compared descriptor", "Could not find stream %s in the compared descriptor",
((StreamNode *) rstream_list->data)->id); ((StreamNode *) rstream_list->data)->id);

View file

@ -119,8 +119,11 @@ main (int argc, gchar ** argv)
goto out; goto out;
} }
gst_media_descriptors_compare (GST_MEDIA_DESCRIPTOR (reference), if (!gst_media_descriptors_compare (GST_MEDIA_DESCRIPTOR (reference),
GST_MEDIA_DESCRIPTOR (writer)); GST_MEDIA_DESCRIPTOR (writer))) {
ret = 1;
goto out;
}
} else { } else {
output = gst_media_descriptor_writer_serialize (writer); output = gst_media_descriptor_writer_serialize (writer);
g_print ("Media info:\n%s\n", output); g_print ("Media info:\n%s\n", output);