diff --git a/src/mp4/moov.c b/src/mp4/moov.c index c442315..bca9f15 100644 --- a/src/mp4/moov.c +++ b/src/mp4/moov.c @@ -193,7 +193,7 @@ enum BufError write_mvhd(struct BitBuf *ptr, const struct MoovInfo *moov_info) { chk_err; // 4 Selection duration err = put_u32_be(ptr, 0); chk_err; // 4 Current time - err = put_u32_be(ptr, 2); + err = put_u32_be(ptr, 3); chk_err; // 4 Next track ID err = put_u32_be_to_offset(ptr, start_atom, ptr->offset - start_atom); diff --git a/src/mp4/mp4.c b/src/mp4/mp4.c index e3668ca..33dc3d9 100644 --- a/src/mp4/mp4.c +++ b/src/mp4/mp4.c @@ -106,7 +106,7 @@ enum BufError mp4_set_slice(const char *nal_data, const uint32_t nal_len, samples_info[0].duration = default_sample_size; samples_info[0].flags = is_iframe ? 0 : 65536; samples_info[1].size = buf_aud.offset; - samples_info[1].duration = buf_aud.offset / aud_framesize * aud_samplerate; + samples_info[1].duration = default_sample_size; buf_moof.offset = 0; err = write_moof(