~ft/mcfs

32cb1d0119aa1d70eab4f21a9bdbfefbd299c299 — Sigrid Solveig Haflínudóttir 3 years ago ae64d6c
matroska: fix output sample rate
1 files changed, 5 insertions(+), 4 deletions(-)

M matroska.c
M matroska.c => matroska.c +5 -4
@@ 169,13 169,17 @@ static void
trackinfo(Biobuf *o, Ebml *e)
{
	char *t;
	int rate;

	rate = e->audio.outsamplerate;
	if(rate == 0)
		rate = e->audio.samplerate;
	t = ebmltracktype(e->tracktype);
	Bprint(o, "%d\t%s\t%s\t", e->tracknum, t, format(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", e->audio.channels, (int)e->audio.outsamplerate);
		Bprint(o, "%d\t%d", e->audio.channels, rate);
	else if(e->tracktype == Etracksubtitles)
		Bprint(o, "%s", e->lang);
	else


@@ 262,9 266,6 @@ matroskarun(Biobuf *f)
					trackdump = e.tracknum;
				else if(trackdump == Dumpaudio && e.tracktype == Etrackaudio)
					trackdump = e.tracknum;

				if(e.tracktype == Etrackaudio && e.audio.outsamplerate == 0)
					e.audio.outsamplerate = e.audio.samplerate;
			}
			if(e.tracknum == trackdump)
				memmove(&te, &e, sizeof(e));