[vlc-commits] mux: mp4: set single field duration

Francois Cartegnie git at videolan.org
Fri May 26 11:49:33 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 26 10:08:46 2017 +0200| [9ca1d0842abfe11a24ffa7de749f9eaf53798537] | committer: Francois Cartegnie

mux: mp4: set single field duration

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ca1d0842abfe11a24ffa7de749f9eaf53798537
---

 modules/mux/mp4/mp4.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/mux/mp4/mp4.c b/modules/mux/mp4/mp4.c
index 7db5671f24..fd8d144f11 100644
--- a/modules/mux/mp4/mp4.c
+++ b/modules/mux/mp4/mp4.c
@@ -635,6 +635,8 @@ static int Mux(sout_mux_t *p_mux)
                         p_data->i_length = CLOCK_FREQ *
                                            p_stream->mux.fmt.video.i_frame_rate_base /
                                            p_stream->mux.fmt.video.i_frame_rate;
+                        if( p_data->i_flags & BLOCK_FLAG_SINGLE_FIELD )
+                            p_data->i_length >>= 1;
                         msg_Dbg( p_mux, "video track %u fixup to %"PRId64" for sample %u",
                                  p_stream->mux.i_track_id, p_data->i_length, p_stream->mux.i_entry_count );
                     }



More information about the vlc-commits mailing list