ref: d5b4ab2f6f4446795242254fbb4e0a33966c9bf8
parent: 771e72df354b0a5f6dcbce6c2a59c8d8239a2ec5
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Mar 16 21:20:32 EDT 2020
stts and fix printed names for stsd
--- a/iso.c
+++ b/iso.c
@@ -73,9 +73,15 @@
struct {
u32int handlertype;
u32int entrycount;
+ /* FIXME entries? */
}stsd;
struct {
+ u32int entrycount;
+ /* FIXME entries */
+ }stts;
+
+ struct {
u64int creattime;
u64int modtime;
u32int trackid;
@@ -137,7 +143,7 @@
#define isfullbox(b) ( \
b->type == BoxMvhd || b->type == BoxTrex || b->type == BoxMdhd || b->type == BoxHdlr || \
b->type == BoxMfhd || b->type == BoxTfhd || b->type == BoxTfdt || b->type == BoxTrun || \
- b->type == BoxStsd || b->type == BoxTkhd \
+ b->type == BoxStsd || b->type == BoxStts || b->type == BoxTkhd \
)
#define eBread(sz, e) if(Bread(f, d, sz) != sz){ werrstr(e); goto err; }
@@ -255,8 +261,10 @@
print("\t\t%.*s.timeoffset\t%zd\n", dind, ind, b->trun.samples[u].timeoffset);
}
}else if(b->type == BoxStsd){
- print("\t%.*shandlertype\t%08x\n", dind, ind, b->stsd.handlertype);
- print("\t%.*sentrycount\t%ud\n", dind, ind, b->stsd.entrycount);
+ print("\t%.*shandler_type\t%08x\n", dind, ind, b->stsd.handlertype);
+ print("\t%.*sentry_count\t%ud\n", dind, ind, b->stsd.entrycount);
+ }else if(b->type == BoxStts){
+ print("\t%.*sentry_count\t%ud\n", dind, ind, b->stts.entrycount);
}else if(b->type == BoxTkhd){
print("\t%.*screation_time\t%zd\n", dind, ind, b->tkhd.creattime);
print("\t%.*smodification_timetime\t%zd\n", dind, ind, b->tkhd.modtime);
@@ -432,6 +440,11 @@
b->stsd.handlertype = bu32(d);
eBread(4, "entry_count");
b->stsd.entrycount = bu32(d);
+ /* FIXME not reading actual entries here */
+ printbox(b);
+ }else if(b->type == BoxStts){
+ eBread(4, "entry_count");
+ b->stts.entrycount = bu32(d);
/* FIXME not reading actual entries here */
printbox(b);
}else if(b->type == BoxTkhd){