Commit 35e651b8 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* backport [17410] trough [17412] avi demux and mux fixes

parent 052cbf99
......@@ -53,7 +53,7 @@ static void Close( vlc_object_t * );
static int pi_index[] = {0,1,2};
static char *ppsz_indexes[] = { N_("Ask"),N_("Always fix"),
static const char *ppsz_indexes[] = { N_("Ask"), N_("Always fix"),
N_("Never fix") };
vlc_module_begin();
......@@ -798,7 +798,7 @@ static int Demux_Seekable( demux_t *p_demux )
}
if( toread[i].i_posf > 0 )
{
if( i_pos == -1 || i_pos > toread[i_track].i_posf )
if( i_pos == -1 || i_pos > toread[i].i_posf )
{
i_track = i;
i_pos = toread[i].i_posf;
......@@ -1305,7 +1305,7 @@ static double ControlGetPosition( demux_t *p_demux )
}
}
}
return (double)i64 / (double)stream_Size( p_demux->s );
return (double)i64 / stream_Size( p_demux->s );
}
return 0.0;
}
......
......@@ -473,6 +473,7 @@ static int Mux ( sout_mux_t *p_mux )
if( p_data->i_buffer & 0x01 )
{
p_data = block_Realloc( p_data, 0, p_data->i_buffer + 1 );
p_data->p_buffer[ p_data->i_buffer - 1 ] = '\0';
}
p_sys->i_movi_size += p_data->i_buffer;
......@@ -625,8 +626,8 @@ static int avi_HeaderAdd_avih( sout_mux_t *p_mux,
if( p_sys->stream[i_stream].i_duration > 0 )
{
i_maxbytespersec +=
p_sys->stream[p_sys->i_stream_video].i_totalsize /
p_sys->stream[p_sys->i_stream_video].i_duration;
p_sys->stream[i_stream].i_totalsize /
p_sys->stream[i_stream].i_duration;
}
}
......
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