obs-outputs: Skip trak box if track has no data

This commit is contained in:
derrod
2024-06-23 01:19:16 +02:00
committed by Ryan Foster
parent b34fbb116e
commit 2e6e79b4f5

View File

@@ -1718,6 +1718,10 @@ static size_t mp4_write_trak(struct mp4_mux *mux, struct mp4_track *track,
struct serializer *s = mux->serializer;
int64_t start = serializer_get_pos(s);
/* If track has no data, omit it from full moov. */
if (!fragmented && !track->chunks.num)
return 0;
write_box(s, 0, "trak");
// tkhd