summaryrefslogtreecommitdiff
path: root/plugins/artwork/artwork.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/artwork/artwork.c')
-rw-r--r--plugins/artwork/artwork.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c
index 94717931..a6c27172 100644
--- a/plugins/artwork/artwork.c
+++ b/plugins/artwork/artwork.c
@@ -1166,7 +1166,18 @@ fetcher_thread (void *none)
break;
}
- if(! (is_ogg? FLAC__metadata_chain_read_ogg_with_callbacks(chain, (FLAC__IOHandle)file, iocb) : FLAC__metadata_chain_read_with_callbacks(chain, (FLAC__IOHandle)file, iocb)) ) {
+ int res = 0;
+ if (is_ogg) {
+#if USE_OGG
+ res = FLAC__metadata_chain_read_ogg_with_callbacks(chain, (FLAC__IOHandle)file, iocb);
+#endif
+ }
+ else
+ {
+ res = FLAC__metadata_chain_read_with_callbacks(chain, (FLAC__IOHandle)file, iocb);
+ }
+
+ if(!res) {
trace ("artwork: failed to read metadata from flac: %s\n", filename);
deadbeef->fclose (file);
FLAC__metadata_chain_delete(chain);