diff --git a/src/tags/flac_header.c b/src/tags/flac_header.c
index fee66b8..fa43ca5 100644
--- a/src/tags/flac_header.c
+++ b/src/tags/flac_header.c
@@ -108,7 +108,8 @@ et_flac_header_read_file_info (GFile *file,
 
         metadata_len += block->length;
 
-        if (block->type == FLAC__METADATA_TYPE_STREAMINFO)
+        if (FLAC__metadata_iterator_get_block_type (iter)
+            == FLAC__METADATA_TYPE_STREAMINFO)
         {
             const FLAC__StreamMetadata_StreamInfo *stream_info = &block->data.stream_info;
             ETFileInfo->duration = stream_info->total_samples
