~ft/mcfs

517cd21652ad1f1492b8a74bc16889dddc22f614 — Sigrid Solveig Haflínudóttir 3 years ago 9619ba5
matroska: print audio/subtitle track name
1 files changed, 5 insertions(+), 2 deletions(-)

M matroska.c
M matroska.c => matroska.c +5 -2
@@ 18,6 18,7 @@ struct Ebml {
	int tracktype;
	vlong codecdelay;
	char lang[8];
	char name[256];
};

static Packet packets[256];


@@ 186,9 187,9 @@ trackinfo(Biobuf *o, Ebml *e)
	if(e->tracktype == Etrackvideo)
		Bprint(o, "%d\t%d", e->video.width, e->video.height);
	else if(e->tracktype == Etrackaudio)
		Bprint(o, "%d\t%d\t%s", e->audio.channels, rate, e->lang);
		Bprint(o, "%d\t%d\t%s\t%s", e->audio.channels, rate, e->lang, e->name);
	else if(e->tracktype == Etracksubtitles)
		Bprint(o, "%s", e->lang);
		Bprint(o, "%s\t%s", e->lang, e->name);
	else
		Bprint(o, "???");
	Bprint(o, "\n");


@@ 494,6 495,8 @@ matroskarun(Biobuf *f)
			getnumber(EBlockDuration, te.blockdur)
		else
			getstring(ELanguage, e.lang)
		else
			getstring(EName, e.name)

		if(sz > 0){
			if(Bseek(f, sz, 1) < 0)