@@ -789,6 +789,7 @@ namespace Elements
789
789
const int64u moov_trak_mdia_minf_stbl_stsd_mebx_keys=0x6B657973;
790
790
const int64u moov_trak_mdia_minf_stbl_stsd_mebx_keys_PHDR=0x50484452;
791
791
const int64u moov_trak_mdia_minf_stbl_stsd_mebx_keys_PHDR_keyd=0x6B657964;
792
+ const int64u moov_trak_mdia_minf_stbl_stsd_mett=0x6D657474;
792
793
const int64u moov_trak_mdia_minf_stbl_stsd_mp4a=0x6D703461;
793
794
const int64u moov_trak_mdia_minf_stbl_stsd_mp4s=0x6D703473;
794
795
const int64u moov_trak_mdia_minf_stbl_stsd_mp4v=0x6D703476;
@@ -5742,8 +5743,44 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_tx3g_ftab()
5742
5743
void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx()
5743
5744
{
5744
5745
//Parsing
5745
- Skip_B6( "Reserved");
5746
- Skip_B2( "Data reference index");
5746
+ string CodecIDAddition;
5747
+ if (StreamKind_Last==Stream_Max)
5748
+ {
5749
+ switch (Element_Code)
5750
+ {
5751
+ case Elements::moov_trak_mdia_minf_stbl_stsd_mett:
5752
+ {
5753
+ string mime_format;
5754
+ Element_Name("Metadata");
5755
+ Skip_String(SizeUpTo0(), "content_encoding");
5756
+ Skip_B1( "zero");
5757
+ Get_String(SizeUpTo0(), CodecIDAddition, "mime_format");
5758
+ Skip_B1( "zero");
5759
+ break;
5760
+ }
5761
+ default:
5762
+ {
5763
+ auto NotAscii=false;
5764
+ if (Element_Size>=6)
5765
+ {
5766
+ for (auto Current=Buffer+Buffer_Offset, End=Current+6; Current<End; Current++)
5767
+ {
5768
+ if (!IsAsciiLower(*Current) && !IsAsciiUpper(*Current))
5769
+ NotAscii=true;
5770
+ }
5771
+ }
5772
+ if (Element_Size<6 || !NotAscii)
5773
+ {
5774
+ Skip_XX(Element_Size, "(Unknown)");
5775
+ }
5776
+ }
5777
+ }
5778
+ }
5779
+ if (!Element_Offset)
5780
+ {
5781
+ Skip_B6( "Reserved");
5782
+ Skip_B2( "Data reference index");
5783
+ }
5747
5784
5748
5785
//Test of buggy files
5749
5786
if (StreamKind_Last==Stream_Other && Element_Code==0x61766331) //"avc1"
@@ -5785,7 +5822,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxx()
5785
5822
case Stream_Video : moov_trak_mdia_minf_stbl_stsd_xxxxVideo(); break;
5786
5823
case Stream_Audio : moov_trak_mdia_minf_stbl_stsd_xxxxSound(); break;
5787
5824
case Stream_Text : moov_trak_mdia_minf_stbl_stsd_xxxxText (); break;
5788
- default : moov_trak_mdia_minf_stbl_stsd_xxxxOthers();
5825
+ default : moov_trak_mdia_minf_stbl_stsd_xxxxOthers(CodecIDAddition );
5789
5826
}
5790
5827
5791
5828
if (Element_IsWaitingForMoreData())
@@ -6651,7 +6688,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxVideo()
6651
6688
}
6652
6689
6653
6690
//---------------------------------------------------------------------------
6654
- void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxOthers()
6691
+ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxOthers(const string& CodecIDAddition )
6655
6692
{
6656
6693
switch (Element_Code)
6657
6694
{
@@ -6664,6 +6701,11 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxOthers()
6664
6701
if (Element_Code)
6665
6702
{
6666
6703
CodecID_Fill(Ztring().From_CC4((int32u)Element_Code), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Mpeg4);
6704
+ if (!CodecIDAddition.empty())
6705
+ {
6706
+ auto CodecID=Retrieve(Stream_Other, StreamPos_Last, Other_CodecID).To_UTF8();
6707
+ Fill(Stream_Other, StreamPos_Last, Other_CodecID, CodecID+'-'+CodecIDAddition, true, true);
6708
+ }
6667
6709
}
6668
6710
6669
6711
FILLING_BEGIN();
0 commit comments