Skip to content

Commit

Permalink
libmp4v2: support opus in isobmff
Browse files Browse the repository at this point in the history
  • Loading branch information
nu774 committed Jan 20, 2024
1 parent e1eee23 commit 8c8dcfc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mp4v2/src/atom_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ MP4SoundAtom::MP4SoundAtom(MP4File &file, const char *atomid)
//AddProperty( new MP4BytesProperty(*this, "alacInfo", 36));
} else if (ATOMID(atomid) == ATOMID("fLaC")) {
ExpectChildAtom("dfLa", Optional, Optional);
} else if (ATOMID(atomid) == ATOMID("Opus")) {
ExpectChildAtom("dOps", Optional, Optional);
}
}

Expand Down
1 change: 1 addition & 0 deletions mp4v2/src/atom_stsd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ MP4StsdAtom::MP4StsdAtom(MP4File &file)
ExpectChildAtom("tx3g", Optional, Many);
ExpectChildAtom("ac-3", Optional, Many);
ExpectChildAtom("fLaC", Optional, Many);
ExpectChildAtom("Opus", Optional, Many);
}

void MP4StsdAtom::Read()
Expand Down
4 changes: 4 additions & 0 deletions mp4v2/src/mp4atom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,10 @@ MP4Atom::factory( MP4File &file, MP4Atom* parent, const char* type )

// no-context construction (old-style)
switch( (uint8_t)type[0] ) {
case 'O':
if( ATOMID(type) == ATOMID("Opus") )
return new MP4SoundAtom(file, type);
break;
case 'S':
if( ATOMID(type) == ATOMID("SVQ3") )
return new MP4VideoAtom( file, type );
Expand Down

0 comments on commit 8c8dcfc

Please sign in to comment.