Commit f9882861 authored by Steve Lhomme's avatar Steve Lhomme

mkv.cpp: hide the navigation packet from the user

parent 36180ddf
......@@ -1781,7 +1781,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
msg_Err( p_demux, "invalid track number=%d", block->TrackNum() );
return;
}
if( tk->p_es == NULL )
if( tk->fmt.i_cat != NAV_ES && tk->p_es == NULL )
{
msg_Err( p_demux, "unknown track number=%d", block->TrackNum() );
return;
......@@ -1791,7 +1791,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
return; /* discard audio packets that shouldn't be rendered */
}
if ( tk->fmt.i_cat != SPU_ES || strcmp( tk->psz_codec, "B_VOBBTN" ) )
if ( tk->fmt.i_cat != NAV_ES )
{
es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE, tk->p_es, &b );
......@@ -1834,20 +1834,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
}
#endif
// TODO implement correct timestamping when B frames are used
if( tk->fmt.i_cat != VIDEO_ES )
{
p_block->i_dts = p_block->i_pts = i_pts;
}
else
{
p_block->i_dts = i_pts;
p_block->i_pts = 0;
}
if ( tk->fmt.i_cat == SPU_ES )
{
if ( !strcmp( tk->psz_codec, "B_VOBBTN" ) )
if ( tk->fmt.i_cat == NAV_ES )
{
// TODO handle the start/stop times of this packet
if ( p_sys->b_ui_hooked )
......@@ -1861,12 +1848,21 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
}
return;
}
// TODO implement correct timestamping when B frames are used
if( tk->fmt.i_cat != VIDEO_ES )
{
p_block->i_dts = p_block->i_pts = i_pts;
}
else
{
p_block->i_dts = i_pts;
p_block->i_pts = 0;
}
else if ( strcmp( tk->psz_codec, "S_VOBSUB" ) )
if ( strcmp( tk->psz_codec, "S_VOBSUB" ) )
{
p_block->i_length = i_duration * 1000;
}
}
es_out_Send( p_demux->out, tk->p_es, p_block );
......@@ -2251,7 +2247,8 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
}
else if( !strcmp( tracks[i_track]->psz_codec, "B_VOBBTN" ) )
{
tracks[i_track]->fmt.i_codec = VLC_FOURCC( 's','p','u',' ' );
tracks[i_track]->fmt.i_cat = NAV_ES;
continue;
}
else
{
......@@ -4537,13 +4534,6 @@ void matroska_segment_c::InformationCreate( )
{
size_t i_track;
/*************
impossible as is it now, vlc_meta_Delete is not clean
if ( sys.meta != NULL )
vlc_meta_Delete( sys.meta );
*/
sys.meta = vlc_meta_New();
if( psz_title )
......
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