lib/xiph/FlacStreamMetadata: move code to Scan(FLAC__StreamMetadata_StreamInfo)
This commit is contained in:
parent
24b14c5aa5
commit
e1ddb63054
@ -131,6 +131,14 @@ flac_duration(const FLAC__StreamMetadata_StreamInfo *stream_info) noexcept
|
|||||||
stream_info->sample_rate);
|
stream_info->sample_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
Scan(const FLAC__StreamMetadata_StreamInfo &stream_info,
|
||||||
|
TagHandler &handler) noexcept
|
||||||
|
{
|
||||||
|
if (stream_info.sample_rate > 0)
|
||||||
|
handler.OnDuration(flac_duration(&stream_info));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
flac_scan_metadata(const FLAC__StreamMetadata *block,
|
flac_scan_metadata(const FLAC__StreamMetadata *block,
|
||||||
TagHandler &handler) noexcept
|
TagHandler &handler) noexcept
|
||||||
@ -142,8 +150,7 @@ flac_scan_metadata(const FLAC__StreamMetadata *block,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FLAC__METADATA_TYPE_STREAMINFO:
|
case FLAC__METADATA_TYPE_STREAMINFO:
|
||||||
if (block->data.stream_info.sample_rate > 0)
|
Scan(block->data.stream_info, handler);
|
||||||
handler.OnDuration(flac_duration(&block->data.stream_info));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user