Skip to content

Conversation

@Shootfast
Copy link

Not sure if this sort of thing would be welcome in the upstream library, but I wrote a small tool to help me find the full path to each atom within the quicktime.

Tools such as mp4extract and mp4edit require an atom_path, but it can be tricky to identify this path given only the atom name.
This tool will walk the atom heirarchy and list the full path to each atom it finds.

Tools such as mp4extract and mp4edit require an atom_path, but it can be
tricky to identify this path given only the atom name.
This tool will walk the atom heirarchy and list the full path to each
atom it finds.
if (parent != NULL){
AP4_List<AP4_Atom>& children = parent->GetChildren();
AP4_Cardinal n_children = children.ItemCount();
for (int i=0; i<n_children; ++i){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i=0; i<n_children; ++i){
for (unsigned i=0; i<n_children; ++i){

using an int as loop index triggers a signed/unsigned comparison warning at compile time

AP4_List<AP4_Atom>& children = top_level.GetChildren();
AP4_Cardinal n_children = children.ItemCount();
std::string path;
for (int i=0; i<n_children; ++i){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i=0; i<n_children; ++i){
for (unsigned i=0; i<n_children; ++i){

using an int as loop index triggers a signed/unsigned comparison warning at compile time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants