Write index always in front when dealing with DASH
This commit is contained in:
parent
2eb8760afa
commit
a6b2d10655
|
@ -239,7 +239,7 @@ void Mp4Container::internalMakeFile()
|
||||||
// -> whether rewrite is required (always required when forced to rewrite or when tracks have been altered)
|
// -> whether rewrite is required (always required when forced to rewrite or when tracks have been altered)
|
||||||
bool rewriteRequired = fileInfo().isForcingRewrite() || writeChunkByChunk;
|
bool rewriteRequired = fileInfo().isForcingRewrite() || writeChunkByChunk;
|
||||||
// -> use the preferred tag position/index position (force one wins, if both are force tag pos wins; might be changed later if none is forced)
|
// -> use the preferred tag position/index position (force one wins, if both are force tag pos wins; might be changed later if none is forced)
|
||||||
const ElementPosition initialNewTagPos = fileInfo().forceTagPosition() || !fileInfo().forceIndexPosition() ? fileInfo().tagPosition() : fileInfo().indexPosition();
|
ElementPosition initialNewTagPos = fileInfo().forceTagPosition() || !fileInfo().forceIndexPosition() ? fileInfo().tagPosition() : fileInfo().indexPosition();
|
||||||
ElementPosition newTagPos = initialNewTagPos;
|
ElementPosition newTagPos = initialNewTagPos;
|
||||||
// -> current tag position (determined later)
|
// -> current tag position (determined later)
|
||||||
ElementPosition currentTagPos;
|
ElementPosition currentTagPos;
|
||||||
|
@ -325,6 +325,14 @@ void Mp4Container::internalMakeFile()
|
||||||
currentTagPos = ElementPosition::Keep;
|
currentTagPos = ElementPosition::Keep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure index and tags are always placed at the beginning when dealing with DASH files
|
||||||
|
if(firstMovieFragmentAtom) {
|
||||||
|
if(initialNewTagPos == ElementPosition::AfterData) {
|
||||||
|
addNotification(NotificationType::Warning, "Sorry, but putting index/tags at the end is not possible when dealing with DASH files.", context);
|
||||||
|
}
|
||||||
|
initialNewTagPos = newTagPos = ElementPosition::BeforeData;
|
||||||
|
}
|
||||||
|
|
||||||
// user data atom, meta atom, next sibling of meta atom
|
// user data atom, meta atom, next sibling of meta atom
|
||||||
if((userDataAtom = movieAtom->childById(Mp4AtomIds::UserData))) {
|
if((userDataAtom = movieAtom->childById(Mp4AtomIds::UserData))) {
|
||||||
metaAtom = userDataAtom->childById(Mp4AtomIds::Meta);
|
metaAtom = userDataAtom->childById(Mp4AtomIds::Meta);
|
||||||
|
|
Loading…
Reference in New Issue