aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/flac_metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/flac_metadata.c')
-rw-r--r--src/decoder/flac_metadata.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/flac_metadata.c b/src/decoder/flac_metadata.c
index 6987971c8..a19220572 100644
--- a/src/decoder/flac_metadata.c
+++ b/src/decoder/flac_metadata.c
@@ -224,7 +224,8 @@ flac_tag_apply_metadata(struct tag *tag, const char *track,
break;
case FLAC__METADATA_TYPE_STREAMINFO:
- tag->time = flac_duration(&block->data.stream_info);
+ if (block->data.stream_info.sample_rate > 0)
+ tag->time = flac_duration(&block->data.stream_info);
break;
default: