1
0

id3_frame_parse.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // The authors have released ID3Lib as Public Domain (PD) and claim no copyright,
  2. // patent or other intellectual property protection in this work. This means that
  3. // it may be modified, redistributed and used in commercial and non-commercial
  4. // software and hardware without restrictions. ID3Lib is distributed on an "AS IS"
  5. // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
  6. //
  7. // The ID3Lib authors encourage improvements and optimisations to be sent to the
  8. // ID3Lib coordinator, currently Dirk Mahoney ([email protected]). Approved
  9. // submissions may be altered, and will be included and released under these terms.
  10. //
  11. // Mon Nov 23 18:34:01 1998
  12. #include "id3_frame.h"
  13. void ID3_Frame::Parse(uchar *buffer, luint size)
  14. {
  15. luint i;
  16. luint posn = 0;
  17. for (i = 0; i < numFields; i++)
  18. {
  19. fields[i]->SetVersion (version, revision);
  20. posn += fields[i]->Parse (buffer, posn, size);
  21. // if we just parsed a TEXTENC field, we'd
  22. // better tell the rest of the concerned string
  23. // fields in the frame what they are expected to
  24. // parse (ASCII or Unicode)
  25. if (fields[i]->name == ID3FN_TEXTENC)
  26. UpdateStringTypes();
  27. }
  28. hasChanged = false;
  29. return;
  30. }