[vlc-devel] commit: test: Use image.jpg for testing tracks reading. (Pierre d' Herbemont )
git version control
git at videolan.org
Tue Feb 23 14:13:58 CET 2010
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Tue Feb 23 13:59:04 2010 +0100| [db1e6a133d1e29d3eb5bf8d526b76423d523d6a9] | committer: Pierre d'Herbemont
test: Use image.jpg for testing tracks reading.
image.jpg is a very small 1x1 image.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db1e6a133d1e29d3eb5bf8d526b76423d523d6a9
---
test/Makefile.am | 2 +-
test/libvlc/media.c | 5 +++--
test/samples/image.jpg | Bin 0 -> 2170 bytes
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/Makefile.am b/test/Makefile.am
index 4088a98..0b11a9b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -29,7 +29,7 @@ EXTRA_PROGRAMS = \
$(NULL)
#check_DATA = samples/test.sample samples/meta.sample
-EXTRA_DIST = samples/empty.voc
+EXTRA_DIST = samples/empty.voc samples/image.jpg
check_HEADERS = libvlc/test.h libvlc/libvlc_additions.h
diff --git a/test/libvlc/media.c b/test/libvlc/media.c
index 90aedb6..95ed765 100644
--- a/test/libvlc/media.c
+++ b/test/libvlc/media.c
@@ -33,7 +33,8 @@ static void preparsed_changed(const libvlc_event_t *event, void *user_data)
static void test_media_preparsed(const char** argv, int argc)
{
- const char * file = test_default_sample;
+ // We use this image file because "empty.voc" has no track.
+ const char * file = SRCDIR"/samples/image.jpg";
log ("Testing set_media\n");
@@ -58,7 +59,7 @@ static void test_media_preparsed(const char** argv, int argc)
// We are good, now check Elementary Stream info.
libvlc_media_track_info_t *tracks;
int num = libvlc_media_get_tracks_info(media, &tracks);
- assert(num > 0);
+ assert(num == 1);
free(tracks);
libvlc_media_release (media);
diff --git a/test/samples/image.jpg b/test/samples/image.jpg
new file mode 100755
index 0000000..7a8d308
Binary files /dev/null and b/test/samples/image.jpg differ
More information about the vlc-devel
mailing list