From: Lutz M?l. <lu...@us...> - 2003-10-27 20:10:08
|
Update of /cvsroot/libexif/libexif/test In directory sc8-pr-cvs1:/tmp/cvs-serv6680/test Modified Files: test-mnote.c Log Message: 2003-10-27 Lutz Mueller <lu...@us...> * libexif: The code now compiles and loads the canon maker note, but crashes if you query its contents. Index: test-mnote.c =================================================================== RCS file: /cvsroot/libexif/libexif/test/test-mnote.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test-mnote.c 26 Oct 2003 22:30:27 -0000 1.1 +++ test-mnote.c 27 Oct 2003 20:07:11 -0000 1.2 @@ -24,6 +24,9 @@ fprintf (stderr, "Could not load data from '%s'!\n", argv[1]); return 1; } + fprintf (stdout, "Loaded '%s'.\n", argv[1]); + fprintf (stdout, "Byte order: %s\n", + exif_byte_order_get_name (exif_data_get_byte_order (d))); fprintf (stdout, "Parsing maker note...\n"); md = exif_data_get_mnote_data (d); @@ -33,6 +36,13 @@ return 1; } + fprintf (stdout, "Increasing ref-count...\n"); + exif_mnote_data_ref (md); + + fprintf (stdout, "Decreasing ref-count...\n"); + exif_mnote_data_unref (md); + + fprintf (stdout, "Counting entries...\n"); c = exif_mnote_data_count (md); for (i = 0; i < c; i++) { fprintf (stdout, "%s", exif_mnote_data_get_name (md, i)); @@ -48,4 +58,6 @@ } exif_data_unref (d); + + return 1; } |