Skip to content

Commit 84f6cd0

Browse files
committed
Fix flag and version bytes where not being correctly written
Originally created by @samueldjack PR#18 Refreshed by @rboy1. Closes PR#149 Reformatted by @decriptor
1 parent 8d6a1c8 commit 84f6cd0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/TaglibSharp/Mpeg4/AppleTag.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ public void SetDashBox (string meanstring, string namestring, string datastring)
435435
data_box.Text = datastring;
436436
} else {
437437
//Create the new boxes, should use 1 for text as a flag
438-
var amean_box = new AppleAdditionalInfoBox (BoxType.Mean);
439-
var aname_box = new AppleAdditionalInfoBox (BoxType.Name);
438+
var amean_box = new AppleAdditionalInfoBox (BoxType.Mean, 0, 1);
439+
var aname_box = new AppleAdditionalInfoBox (BoxType.Name, 0, 1);
440440
var adata_box = new AppleDataBox (BoxType.Data, 1);
441441
amean_box.Text = meanstring;
442442
aname_box.Text = namestring;

src/TaglibSharp/Mpeg4/Boxes/AppleAdditionalInfoBox.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
namespace TagLib.Mpeg4
2828
{
2929
/// <summary>
30-
/// This class extends <see cref="Box" /> to provide an
30+
/// This class extends <see cref="FullBox" /> to provide an
3131
/// implementation of an Apple AdditionalInfoBox.
3232
/// </summary>
33-
public class AppleAdditionalInfoBox : Box
33+
public class AppleAdditionalInfoBox : FullBox
3434
{
3535
#region Private Fields
3636

@@ -66,19 +66,19 @@ public class AppleAdditionalInfoBox : Box
6666
/// <paramref name="file" /> is <see langword="null" />.
6767
/// </exception>
6868
public AppleAdditionalInfoBox (BoxHeader header, TagLib.File file, IsoHandlerBox handler)
69-
: base (header, handler)
69+
: base (header, file, handler)
7070
{
7171
// We do not care what is in this custom data section
7272
// see: https://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap2/qtff2.html
73-
Data = LoadData (file);
73+
Data = file.ReadBlock (DataSize > 0 ? DataSize : 0);
7474
}
7575

7676
/// <summary>
7777
/// Constructs and initializes a new instance of <see
7878
/// cref="AppleAdditionalInfoBox" /> using specified header, version and flags
7979
/// </summary>
8080
/// <param name="header">defines the header data</param>
81-
public AppleAdditionalInfoBox (ByteVector header) : base (header)
81+
public AppleAdditionalInfoBox (ByteVector header, byte version, uint flags) : base (header, version, flags)
8282
{
8383
}
8484

0 commit comments

Comments
 (0)