mux: mp4: set single field duration
authorFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 26 May 2017 08:08:46 +0000 (10:08 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 26 May 2017 09:01:39 +0000 (11:01 +0200)
modules/mux/mp4/mp4.c

index 7db5671..fd8d144 100644 (file)
@@ -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 );
                     }