Project

General

Profile

scanner.cc.diff

scanner.cc patch - Jim Turner, March 07, 2019 16:37

View differences:

scanner.cc.PATCHED 2019-03-07 10:02:11.868837968 -0600
76 76

  
77 77
    bool need_tuple = (flags & SCAN_TUPLE) && ! tuple.valid ();
78 78
    bool need_image = (flags & SCAN_IMAGE);
79
    Tuple dummy_tuple;  // JWT:FOR WHEN WE ONLY WANT THE IMAGE W/O TOUCHING THE TUPLE DATA!
79 80

  
80 81
    if (! decoder)
81 82
        decoder = aud_file_find_decoder (audio_file, false, file, & error);
......
87 88
        if (! (ip = load_input_plugin (decoder, & error)))
88 89
            goto err;
89 90

  
90
        Index<char> * pimage = need_image ? & image_data : nullptr;
91
        if (! aud_file_read_tag (audio_file, decoder, file, tuple, pimage, & error))
92
            goto err;
91
        if (flags & SCAN_CUESHEET)  // JWT:CUESHEETS: DON'T REREAD(CLOBBER) CUESHEETS' TAGS - WE ALREADY HAVE 'EM, JUST NEED IMAGE!:
92
        {
93
            Index<char> * pimage = & image_data;
94
            if (! aud_file_read_tag (audio_file, decoder, file, dummy_tuple, pimage, & error))
95
                goto err;
96
        }
97
        else
98
        {
99
            Index<char> * pimage = need_image ? & image_data : nullptr;
100
            if (! aud_file_read_tag (audio_file, decoder, file, tuple, pimage, & error))
101
                goto err;
102
        }
93 103

  
94 104
        if ((flags & SCAN_IMAGE) && ! image_data.len ())
95 105
            image_file = art_search (audio_file);