~ubuntu-branches/ubuntu/raring/tracker/raring

« back to all changes in this revision

Viewing changes to src/tracker-extract/tracker-albumart-pixbuf.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2011-08-26 00:26:14 UTC
  • mfrom: (4.3.17 sid)
  • Revision ID: package-import@ubuntu.com-20110826002614-4qjfs9jhh5gs4p13
Tags: 0.10.24-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                                 const gchar         *buffer_mime,
68
68
                                 const gchar         *target)
69
69
{
70
 
        if (g_strcmp0 (buffer_mime, "image/jpeg") == 0 ||
71
 
            g_strcmp0 (buffer_mime, "JPG") == 0) {
 
70
        /* FF D8 FF are the three first bytes of JPeg images */
 
71
        if ((g_strcmp0 (buffer_mime, "image/jpeg") == 0 ||
 
72
            g_strcmp0 (buffer_mime, "JPG") == 0) &&
 
73
            (buffer && len > 2 && buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff)) {
72
74
 
73
75
                g_debug ("Saving album art using raw data as uri:'%s'",
74
76
                         target);