summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/flac/gstflacdec.c13
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bca5aefa..748ff829 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-17 Tim-Philipp Müller <tim at centricular dot net>
+
+ * ext/flac/gstflacdec.c:
+ Fix compilation against flac 1.1.2 (as on debian stable), where
+ the picture metadata defines and structs don't exist yet.
+ Fixes #509301.
+
2008-01-17 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Olivier Crete <tester at tester dot ca>
diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c
index fd4126a7..33af0da7 100644
--- a/ext/flac/gstflacdec.c
+++ b/ext/flac/gstflacdec.c
@@ -300,8 +300,11 @@ gst_flac_dec_setup_seekable_decoder (GstFlacDec * dec)
gst_flac_dec_write_seekable);
FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder,
FLAC__METADATA_TYPE_VORBIS_COMMENT);
+/* FIXME: remove ifdef once we depend on flac >= 1.2.x */
+#ifdef FLAC__METADATA_TYPE_PICTURE
FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder,
FLAC__METADATA_TYPE_PICTURE);
+#endif
FLAC__seekable_stream_decoder_set_metadata_callback (dec->seekable_decoder,
gst_flac_dec_metadata_callback_seekable);
FLAC__seekable_stream_decoder_set_error_callback (dec->seekable_decoder,
@@ -333,8 +336,11 @@ gst_flac_dec_setup_stream_decoder (GstFlacDec * dec)
gst_flac_dec_write_stream);
FLAC__stream_decoder_set_metadata_respond (dec->stream_decoder,
FLAC__METADATA_TYPE_VORBIS_COMMENT);
+/* FIXME: remove ifdef once we depend on flac >= 1.2.x */
+#ifdef FLAC__METADATA_TYPE_PICTURE
FLAC__stream_decoder_set_metadata_respond (dec->stream_decoder,
FLAC__METADATA_TYPE_PICTURE);
+#endif
FLAC__stream_decoder_set_metadata_callback (dec->stream_decoder,
gst_flac_dec_metadata_callback_stream);
FLAC__stream_decoder_set_error_callback (dec->stream_decoder,
@@ -573,6 +579,8 @@ gst_flac_dec_scan_for_last_block (GstFlacDec * flacdec, gint64 * samples)
}
}
+/* FIXME: remove ifdef once we depend on flac >= 1.2.x */
+#ifdef FLAC__METADATA_TYPE_PICTURE
static gchar *
gst_flac_normalize_picture_mime_type (const gchar * old_mime_type,
gboolean * is_pic_uri)
@@ -695,6 +703,7 @@ gst_flac_extract_picture_buffer (GstFlacDec * flacdec,
GST_DEBUG ("problem parsing PICTURE block, skipping");
}
}
+#endif /* FLAC__METADATA_TYPE_PICTURE */
static void
gst_flac_dec_metadata_callback (GstFlacDec * flacdec,
@@ -741,10 +750,14 @@ gst_flac_dec_metadata_callback (GstFlacDec * flacdec,
}
break;
}
+
+/* FIXME: remove ifdef once we depend on flac >= 1.2.x */
+#ifdef FLAC__METADATA_TYPE_PICTURE
case FLAC__METADATA_TYPE_PICTURE:{
gst_flac_extract_picture_buffer (flacdec, metadata);
break;
}
+#endif
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
gst_flac_dec_update_metadata (flacdec, metadata);
break;