mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
ext/flac/gstflacdec.c: Fix extraction of picture blocks with newer libflac versions again:
Original commit message from CVS: Patch by: John Millikin <jmillikin at gmail dot com> * ext/flac/gstflacdec.c: (gst_flac_dec_scan_for_last_block), (gst_flac_extract_picture_buffer), (gst_flac_dec_metadata_callback): Fix extraction of picture blocks with newer libflac versions again: FLAC__METADATA_TYPE_PICTURE is an enum, not a define (#513628).
This commit is contained in:
parent
cf1135694d
commit
2fced64b4f
2 changed files with 14 additions and 15 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2008-02-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
Patch by: John Millikin <jmillikin at gmail dot com>
|
||||||
|
|
||||||
|
* ext/flac/gstflacdec.c: (gst_flac_dec_scan_for_last_block),
|
||||||
|
(gst_flac_extract_picture_buffer), (gst_flac_dec_metadata_callback):
|
||||||
|
Fix extraction of picture blocks with newer libflac versions again:
|
||||||
|
FLAC__METADATA_TYPE_PICTURE is an enum, not a define (#513628).
|
||||||
|
|
||||||
2008-02-02 Tim-Philipp Müller <tim at centricular dot net>
|
2008-02-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* tests/check/Makefile.am:
|
* tests/check/Makefile.am:
|
||||||
|
|
|
@ -300,11 +300,6 @@ gst_flac_dec_setup_seekable_decoder (GstFlacDec * dec)
|
||||||
gst_flac_dec_write_seekable);
|
gst_flac_dec_write_seekable);
|
||||||
FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder,
|
FLAC__seekable_stream_decoder_set_metadata_respond (dec->seekable_decoder,
|
||||||
FLAC__METADATA_TYPE_VORBIS_COMMENT);
|
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,
|
FLAC__seekable_stream_decoder_set_metadata_callback (dec->seekable_decoder,
|
||||||
gst_flac_dec_metadata_callback_seekable);
|
gst_flac_dec_metadata_callback_seekable);
|
||||||
FLAC__seekable_stream_decoder_set_error_callback (dec->seekable_decoder,
|
FLAC__seekable_stream_decoder_set_error_callback (dec->seekable_decoder,
|
||||||
|
@ -336,11 +331,6 @@ gst_flac_dec_setup_stream_decoder (GstFlacDec * dec)
|
||||||
gst_flac_dec_write_stream);
|
gst_flac_dec_write_stream);
|
||||||
FLAC__stream_decoder_set_metadata_respond (dec->stream_decoder,
|
FLAC__stream_decoder_set_metadata_respond (dec->stream_decoder,
|
||||||
FLAC__METADATA_TYPE_VORBIS_COMMENT);
|
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,
|
FLAC__stream_decoder_set_metadata_callback (dec->stream_decoder,
|
||||||
gst_flac_dec_metadata_callback_stream);
|
gst_flac_dec_metadata_callback_stream);
|
||||||
FLAC__stream_decoder_set_error_callback (dec->stream_decoder,
|
FLAC__stream_decoder_set_error_callback (dec->stream_decoder,
|
||||||
|
@ -579,8 +569,8 @@ gst_flac_dec_scan_for_last_block (GstFlacDec * flacdec, gint64 * samples)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: remove ifdef once we depend on flac >= 1.2.x */
|
/* FIXME: remove ifndef once we depend on flac >= 1.2.x */
|
||||||
#ifdef FLAC__METADATA_TYPE_PICTURE
|
#ifndef LEGACY_FLAC
|
||||||
static gchar *
|
static gchar *
|
||||||
gst_flac_normalize_picture_mime_type (const gchar * old_mime_type,
|
gst_flac_normalize_picture_mime_type (const gchar * old_mime_type,
|
||||||
gboolean * is_pic_uri)
|
gboolean * is_pic_uri)
|
||||||
|
@ -703,7 +693,7 @@ gst_flac_extract_picture_buffer (GstFlacDec * flacdec,
|
||||||
GST_DEBUG ("problem parsing PICTURE block, skipping");
|
GST_DEBUG ("problem parsing PICTURE block, skipping");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* FLAC__METADATA_TYPE_PICTURE */
|
#endif /* LEGACY_FLAC */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_flac_dec_metadata_callback (GstFlacDec * flacdec,
|
gst_flac_dec_metadata_callback (GstFlacDec * flacdec,
|
||||||
|
@ -751,8 +741,8 @@ gst_flac_dec_metadata_callback (GstFlacDec * flacdec,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: remove ifdef once we depend on flac >= 1.2.x */
|
/* FIXME: remove ifndef once we depend on flac >= 1.2.x */
|
||||||
#ifdef FLAC__METADATA_TYPE_PICTURE
|
#ifndef LEGACY_FLAC
|
||||||
case FLAC__METADATA_TYPE_PICTURE:{
|
case FLAC__METADATA_TYPE_PICTURE:{
|
||||||
gst_flac_extract_picture_buffer (flacdec, metadata);
|
gst_flac_extract_picture_buffer (flacdec, metadata);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue