Unable to playback video with custom track im MP4 format
Hello,
hopefully this report is taken in consideration even though I am not familiar with the policies in place in the VLC contributors community.
We are working on a video camera that creates a custom track to contain custom data in a MP4 container in fragmented format.
When playing the video in vlc, the video stutters and continually jumps back and forth.
We have downloaded source of beta version, compiled vlc and track the issue down to an apparently inconsistent conditional in mp4.c
In function DemuxMoof, there is an 'inconsistent check' of the b_ok flag for the track; I call it an inconsisntent check before the same conditional is used in other places of the code in order to skip a track labelled as 'non-ok', but only in the mentioned function '!' is not used. This leads to vlc trying to look for information in a track whose format is unknown, and consequently to errant behaviour. Negating the condition brings vlc back to a correct behaviour.
Below the details of the changed code to obtain correct behaviour.
@@ -4733,7 +4733,7 @@ static int DemuxMoof( demux_t *p_demux ) `for( unsigned i = 0; i < p_sys->i_tracks; i++ ) { mp4_track_t *tk = &p_sys->track[i];
-
if( tk->b_ok || MP4_isMetadata( tk ) ||
-
if( !tk->b_ok || MP4_isMetadata( tk ) || (!tk->b_selected && !p_sys->b_seekable) ) continue; vlc_tick_t i_track_end = MP4_rescale_mtime( tk->i_time, tk->i_timescale );'
In case you need futher details, let me know and I'll do my best to provide them.
Thanks for your time,
Have a Nice Day
PS. Well... it looks I am not good enough to get along with Markdown