[vlc-devel] [PATCH 3/3] fixed the priority calculation. When mediatime is negative in elst it is empty edit. empty edits is used to shift the start time of the track by segment duration.
Jean-Baptiste Kempf
jb at videolan.org
Fri Oct 13 00:24:36 CEST 2017
Hello,
Sorry, but you must resubmit in one coherent patch. Else, it's
impossible to understand/follow...
On Tue, 19 Sep 2017, at 22:47, Rajneesh Soni wrote:
> ---
> modules/demux/mp4/mp4.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
> index 96ebc90..6d0edaf 100644
> --- a/modules/demux/mp4/mp4.c
> +++ b/modules/demux/mp4/mp4.c
> @@ -3469,6 +3469,7 @@ static void MP4_TrackSetup( demux_t *p_demux,
> mp4_track_t *p_track,
> else if ( p_track->p_elst && p_track->fmt.i_priority ==
> ES_PRIORITY_SELECTABLE_MIN )
> {
> #define MAX_SELECTABLE (INT_MAX - ES_PRIORITY_SELECTABLE_MIN)
> + int i_time = 0;
> for ( uint32_t i=0; i<p_track->BOXDATA(p_elst)->i_entry_count;
> i++ )
> {
> if ( p_track->BOXDATA(p_elst)->i_media_time[i] >= 0 &&
> @@ -3476,10 +3477,14 @@ static void MP4_TrackSetup( demux_t *p_demux,
> mp4_track_t *p_track,
> {
> /* We do selection by inverting start time into
> priority.
> The track with earliest edit will have the highest
> prio */
> - const int i_time = __MIN( MAX_SELECTABLE,
> p_track->BOXDATA(p_elst)->i_media_time[i] );
> + i_time += __MIN( MAX_SELECTABLE,
> p_track->BOXDATA(p_elst)->i_media_time[i] );
> p_track->fmt.i_priority = ES_PRIORITY_SELECTABLE_MIN +
> MAX_SELECTABLE - i_time;
> break;
> }
> + else
> + {
> + i_time +=
> p_track->BOXDATA(p_elst)->i_segment_duration[i];
> + }
> }
> }
>
> --
> 2.7.4
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Jean-Baptiste Kempf - President
+33 672 704 734
More information about the vlc-devel
mailing list