taglib: Update createFrame() to non-deprecated version.

ID3v2::FrameFactory::createFrame() versions not taking a Header have
been deprecated since v1.5 (Jan 2008).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/965>
This commit is contained in:
Doug Nazar 2021-04-24 11:15:50 -04:00 committed by GStreamer Marge Bot
parent d75c678479
commit a0067316e7

View file

@ -391,8 +391,15 @@ add_id3v2frame_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
GST_DEBUG ("Injecting ID3v2.%u frame %u/%u of length %" G_GSIZE_FORMAT " and type %" GST_DEBUG ("Injecting ID3v2.%u frame %u/%u of length %" G_GSIZE_FORMAT " and type %"
GST_PTR_FORMAT, version, i, num_tags, map.size, s); GST_PTR_FORMAT, version, i, num_tags, map.size, s);
#if TAGLIB_MAJOR_VERSION > 1 || (TAGLIB_MAJOR_VERSION == 1 && TAGLIB_MINOR_VERSION >= 5)
ID3v2::Header header;
header.setMajorVersion (version);
frame = factory->createFrame (ByteVector ((const char *) map.data,
map.size), &header);
#else
frame = factory->createFrame (ByteVector ((const char *) map.data, frame = factory->createFrame (ByteVector ((const char *) map.data,
map.size), (TagLib::uint) version); map.size), (TagLib::uint) version);
#endif
if (frame) if (frame)
id3v2tag->addFrame (frame); id3v2tag->addFrame (frame);
@ -586,7 +593,13 @@ add_uri_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
g_free (data); g_free (data);
#if TAGLIB_MAJOR_VERSION > 1 || (TAGLIB_MAJOR_VERSION == 1 && TAGLIB_MINOR_VERSION >= 5)
ID3v2::Header header;
header.setMajorVersion (4);
frame = factory->createFrame (bytes, &header);
#else
frame = factory->createFrame (bytes, (TagLib::uint) 4); frame = factory->createFrame (bytes, (TagLib::uint) 4);
#endif
if (frame) { if (frame) {
id3v2tag->addFrame (frame); id3v2tag->addFrame (frame);