mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tests: fix jifmux test for fixed fail()
https://bugzilla.gnome.org/show_bug.cgi?id=680755
This commit is contained in:
parent
9461db97c2
commit
71902797f2
1 changed files with 10 additions and 12 deletions
|
@ -314,15 +314,13 @@ compare_ ## name (ExifEntry * entry, ExifTagCheckData * testdata) \
|
|||
if (!gst_tag_list_get_string_index (testdata->taglist, \
|
||||
gst_tag, 0, &str_tag)) { \
|
||||
/* fail the test if we can't get the tag */ \
|
||||
GST_WARNING ("Failed to get %s from taglist", gst_tag); \
|
||||
fail (); \
|
||||
fail ("Failed to get %s from taglist", gst_tag); \
|
||||
} \
|
||||
\
|
||||
value = __exif_tag_ ## name ## _to_exif_value (str_tag); \
|
||||
\
|
||||
if (value == -1) { \
|
||||
GST_WARNING ("Invalid %s tag value: %s", gst_tag, str_tag); \
|
||||
fail (); \
|
||||
fail ("Invalid %s tag value: %s", gst_tag, str_tag); \
|
||||
} \
|
||||
\
|
||||
if (entry->format == EXIF_TYPE_SHORT) \
|
||||
|
@ -332,9 +330,8 @@ compare_ ## name (ExifEntry * entry, ExifTagCheckData * testdata) \
|
|||
exif_value = (gint) entry->data[0]; \
|
||||
\
|
||||
if (value != exif_value) { \
|
||||
GST_WARNING ("Gstreamer tag value (%d) is different from libexif (%d)", \
|
||||
fail ("Gstreamer tag value (%d) is different from libexif (%d)", \
|
||||
value, exif_value); \
|
||||
fail (); \
|
||||
} \
|
||||
\
|
||||
testdata->result = TRUE; \
|
||||
|
@ -503,7 +500,7 @@ compare_flash (ExifEntry * entry, ExifTagCheckData * testdata)
|
|||
} else if (strcmp (flash_mode, "never") == 0) {
|
||||
fail_unless (((flags >> 3) & 0x3) == 2);
|
||||
} else {
|
||||
fail ();
|
||||
fail ("unexpected flash mode");
|
||||
}
|
||||
testdata->result = TRUE;
|
||||
}
|
||||
|
@ -889,13 +886,14 @@ check_content (ExifContent * content, void *user_data)
|
|||
case EXIF_TYPE_UNDEFINED:{
|
||||
GstMapInfo map;
|
||||
GstBuffer *buf;
|
||||
GstSample *sample;
|
||||
gint i;
|
||||
|
||||
if (!gst_tag_list_get_buffer_index (test_data->taglist,
|
||||
tag_map[tagindex].gst_tag, 0, &buf)) {
|
||||
if (!gst_tag_list_get_sample_index (test_data->taglist,
|
||||
tag_map[tagindex].gst_tag, 0, &sample)) {
|
||||
return;
|
||||
}
|
||||
|
||||
buf = gst_sample_get_buffer (sample);
|
||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
||||
fail_unless (entry->size, map.size);
|
||||
for (i = 0; i < map.size; i++) {
|
||||
|
@ -904,11 +902,11 @@ check_content (ExifContent * content, void *user_data)
|
|||
gst_buffer_unmap (buf, &map);
|
||||
|
||||
test_data->result = TRUE;
|
||||
gst_buffer_unref (buf);
|
||||
gst_sample_unref (sample);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fail ();
|
||||
fail ("unexpected exif type %d", entry->format);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue