aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-06 09:00:32 +0100
committerMax Kellermann <max@duempel.org>2010-01-06 09:00:32 +0100
commitae9c02b3a854cd8520eee696cdd68d0b0c32923f (patch)
treee4c9f522b28c7cf6460374334e178b42659ef508 /src/decoder/_flac_common.h
parent6f6d47dd20d30b81eb710f41cd5149b0ed73f98e (diff)
downloadmpd-ae9c02b3a854cd8520eee696cdd68d0b0c32923f.tar.gz
mpd-ae9c02b3a854cd8520eee696cdd68d0b0c32923f.tar.xz
mpd-ae9c02b3a854cd8520eee696cdd68d0b0c32923f.zip
decoder/flac: remember audio_format, not stream_info
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/decoder/_flac_common.h b/src/decoder/_flac_common.h
index a2d832ad1..d67a5a9e9 100644
--- a/src/decoder/_flac_common.h
+++ b/src/decoder/_flac_common.h
@@ -38,8 +38,6 @@
struct flac_data {
struct pcm_buffer buffer;
- enum sample_format sample_format;
-
/**
* The size of one frame in the output buffer.
*/
@@ -51,12 +49,20 @@ struct flac_data {
bool have_stream_info;
/**
- * A copy of the stream info object passed to the metadata
- * callback. Once we drop support for libFLAC 1.1.2, we can
- * remove this attribute, and use
- * FLAC__stream_decoder_get_total_samples() etc.
+ * Does the FLAC file contain an unsupported audio format?
+ */
+ bool unsupported;
+
+ /**
+ * The validated audio format of the FLAC file. This
+ * attribute is defined if "have_stream_info" is true.
+ */
+ struct audio_format audio_format;
+
+ /**
+ * The total number of frames in this song.
*/
- FLAC__StreamMetadata_StreamInfo stream_info;
+ FLAC__uint64 total_frames;
/**
* The number of the first frame in this song. This is only