Skip to content

Commit

Permalink
MP4: Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 17, 2020
1 parent 6e922b9 commit 721173e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions trunk/src/kernel/srs_kernel_mp4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2744,10 +2744,10 @@ SrsMp4DataEntryBox* SrsMp4DataReferenceBox::entry_at(int index)
return entries.at(index);
}

SrsMp4DataReferenceBox* SrsMp4DataReferenceBox::append(SrsMp4DataEntryBox* v)
// Note that box must be SrsMp4DataEntryBox*
void SrsMp4DataReferenceBox::append(SrsMp4Box* box)
{
entries.push_back(v);
return this;
entries.push_back((SrsMp4DataEntryBox*)box);
}

int SrsMp4DataReferenceBox::nb_header()
Expand Down Expand Up @@ -3765,10 +3765,10 @@ SrsMp4SampleEntry* SrsMp4SampleDescriptionBox::entrie_at(int index)
return entries.at(index);
}

SrsMp4SampleDescriptionBox* SrsMp4SampleDescriptionBox::append(SrsMp4SampleEntry* v)
// Note that box must be SrsMp4SampleEntry*
void SrsMp4SampleDescriptionBox::append(SrsMp4Box* box)
{
entries.push_back(v);
return this;
entries.push_back((SrsMp4SampleEntry*)box);
}

int SrsMp4SampleDescriptionBox::nb_header()
Expand Down
6 changes: 4 additions & 2 deletions trunk/src/kernel/srs_kernel_mp4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,8 @@ class SrsMp4DataReferenceBox : public SrsMp4FullBox
public:
virtual uint32_t entry_count();
virtual SrsMp4DataEntryBox* entry_at(int index);
virtual SrsMp4DataReferenceBox* append(SrsMp4DataEntryBox* v);
// Note that box must be SrsMp4DataEntryBox*
virtual void append(SrsMp4Box* box);
protected:
virtual int nb_header();
virtual srs_error_t encode_header(SrsBuffer* buf);
Expand Down Expand Up @@ -1520,7 +1521,8 @@ class SrsMp4SampleDescriptionBox : public SrsMp4FullBox
public:
virtual uint32_t entry_count();
virtual SrsMp4SampleEntry* entrie_at(int index);
virtual SrsMp4SampleDescriptionBox* append(SrsMp4SampleEntry* v);
// Note that box must be SrsMp4SampleEntry*
virtual void append(SrsMp4Box* box);
protected:
virtual int nb_header();
virtual srs_error_t encode_header(SrsBuffer* buf);
Expand Down

0 comments on commit 721173e

Please sign in to comment.