From b1c8bb2c46c7398e405ef97e186c96d59eb27ff2 Mon Sep 17 00:00:00 2001 From: Barrett17 Date: Wed, 21 Nov 2018 17:24:33 +0100 Subject: [PATCH] MediaFile/MediaTrack: Use MetaData API internally --- src/kits/media/MediaFile.cpp | 4 +++- src/kits/media/MediaTrack.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kits/media/MediaFile.cpp b/src/kits/media/MediaFile.cpp index f04dc7121f..23cfe3cb6e 100644 --- a/src/kits/media/MediaFile.cpp +++ b/src/kits/media/MediaFile.cpp @@ -356,7 +356,9 @@ BMediaFile::AddCopyright(const char* copyright) if (fWriter == NULL) return B_NO_INIT; - return fWriter->SetCopyright(copyright); + BMetaData* data = new BMetaData(); + data->SetString(kCopyright, copyright); + return fWriter->SetMetaData(data); } diff --git a/src/kits/media/MediaTrack.cpp b/src/kits/media/MediaTrack.cpp index fe5f76131e..496e6395a4 100644 --- a/src/kits/media/MediaTrack.cpp +++ b/src/kits/media/MediaTrack.cpp @@ -631,7 +631,9 @@ BMediaTrack::AddCopyright(const char* copyright) if (fWriter == NULL) return B_NO_INIT; - return fWriter->SetCopyright(fStream, copyright); + BMetaData* data = new BMetaData(); + data->SetString(kCopyright, copyright); + return fWriter->SetMetaData(data); }