Commit ae421873 authored by Francois Cartegnie's avatar Francois Cartegnie

mux: mp4: fix invalid track duration

used to compute sample rate by demux
parent 5fdfe680
...@@ -2199,7 +2199,7 @@ static bo_t *GetMoovBox(sout_mux_t *p_mux) ...@@ -2199,7 +2199,7 @@ static bo_t *GetMoovBox(sout_mux_t *p_mux)
bo_add_32be(mdhd, i_timestamp); // creation time bo_add_32be(mdhd, i_timestamp); // creation time
bo_add_32be(mdhd, i_timestamp); // modification time bo_add_32be(mdhd, i_timestamp); // modification time
bo_add_32be(mdhd, p_stream->i_timescale); // timescale bo_add_32be(mdhd, p_stream->i_timescale); // timescale
bo_add_32be(mdhd, i_stream_duration); // duration bo_add_32be(mdhd, i_stream_duration * p_stream->i_timescale / i_movie_timescale); // duration
} else { } else {
mdhd = box_full_new("mdhd", 1, 0); mdhd = box_full_new("mdhd", 1, 0);
if(!mdhd) if(!mdhd)
...@@ -2211,7 +2211,7 @@ static bo_t *GetMoovBox(sout_mux_t *p_mux) ...@@ -2211,7 +2211,7 @@ static bo_t *GetMoovBox(sout_mux_t *p_mux)
bo_add_64be(mdhd, i_timestamp); // creation time bo_add_64be(mdhd, i_timestamp); // creation time
bo_add_64be(mdhd, i_timestamp); // modification time bo_add_64be(mdhd, i_timestamp); // modification time
bo_add_32be(mdhd, p_stream->i_timescale); // timescale bo_add_32be(mdhd, p_stream->i_timescale); // timescale
bo_add_64be(mdhd, i_stream_duration); // duration bo_add_64be(mdhd, i_stream_duration * p_stream->i_timescale / i_movie_timescale); // duration
} }
if (p_stream->fmt.psz_language) { if (p_stream->fmt.psz_language) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment