You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
665B

  1. #include "mov-internal.h"
  2. #include <errno.h>
  3. #include <stdint.h>
  4. #include <stdlib.h>
  5. #include <assert.h>
  6. // 8.8.2 Movie Extends Header Box (p68)
  7. int mov_read_mehd(struct mov_t* mov, const struct mov_box_t* box)
  8. {
  9. unsigned int version;
  10. uint64_t fragment_duration;
  11. version = mov_buffer_r8(&mov->io); /* version */
  12. mov_buffer_r24(&mov->io); /* flags */
  13. if (1 == version)
  14. fragment_duration = mov_buffer_r64(&mov->io); /* fragment_duration*/
  15. else
  16. fragment_duration = mov_buffer_r32(&mov->io); /* fragment_duration*/
  17. (void)box;
  18. //assert(fragment_duration <= mov->mvhd.duration);
  19. return mov_buffer_error(&mov->io);
  20. }