Fix FlacStreamMetadata compile failure
Comment concatenation was accidentally not added previously, which results in a testing failure.
This commit is contained in:
parent
fc08f866ce
commit
a4682cbff5
@ -143,8 +143,7 @@ public final class FlacStreamMetadata {
|
|||||||
bitsPerSample,
|
bitsPerSample,
|
||||||
totalSamples,
|
totalSamples,
|
||||||
/* seekTable= */ null,
|
/* seekTable= */ null,
|
||||||
new Metadata(pictureFrames)
|
concatenateVorbisMetadata(vorbisComments, pictureFrames));
|
||||||
.copyWithAppendedEntriesFrom(VorbisUtil.parseVorbisComments(vorbisComments)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private FlacStreamMetadata(
|
private FlacStreamMetadata(
|
||||||
@ -250,6 +249,22 @@ public final class FlacStreamMetadata {
|
|||||||
return metadata == null ? other : metadata.copyWithAppendedEntriesFrom(other);
|
return metadata == null ? other : metadata.copyWithAppendedEntriesFrom(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns */
|
||||||
|
@Nullable
|
||||||
|
private static Metadata concatenateVorbisMetadata(
|
||||||
|
List<String> vorbisComments,
|
||||||
|
List<PictureFrame> pictureFrames
|
||||||
|
) {
|
||||||
|
@Nullable Metadata parsedVorbisComments = VorbisUtil.parseVorbisComments(vorbisComments);
|
||||||
|
|
||||||
|
if (parsedVorbisComments == null && pictureFrames.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Metadata(pictureFrames)
|
||||||
|
.copyWithAppendedEntriesFrom(parsedVorbisComments);
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns a copy of {@code this} with the seek table replaced by the one given. */
|
/** Returns a copy of {@code this} with the seek table replaced by the one given. */
|
||||||
public FlacStreamMetadata copyWithSeekTable(@Nullable SeekTable seekTable) {
|
public FlacStreamMetadata copyWithSeekTable(@Nullable SeekTable seekTable) {
|
||||||
return new FlacStreamMetadata(
|
return new FlacStreamMetadata(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user