-
Notifications
You must be signed in to change notification settings - Fork 3
/
Issue387Test.java
45 lines (39 loc) · 1.22 KB
/
Issue387Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package org.jaudiotagger.issues;
import org.jaudiotagger.AbstractTestCase;
import org.jaudiotagger.audio.AudioFile;
import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.audio.mp4.Mp4AtomTree;
import java.io.File;
import java.io.RandomAccessFile;
/**
* Test writing mp4
*/
public class Issue387Test extends AbstractTestCase
{
public void testIssue() throws Exception
{
Exception caught = null;
try
{
File orig = new File("testdata", "test100.mp4");
if (!orig.isFile())
{
System.err.println("Unable to test file - not available");
return;
}
File testFile = AbstractTestCase.copyAudioToTmp("test100.mp4");
AudioFile af = AudioFileIO.read(testFile);
System.out.println(af.getAudioHeader());
af.getTagOrCreateAndSetDefault();
af.commit();
Mp4AtomTree atomTree = new Mp4AtomTree(new RandomAccessFile(testFile, "r"));
atomTree.printAtomTree();
}
catch(Exception e)
{
caught=e;
e.printStackTrace();
}
assertNull(caught);
}
}