#include <vlc_plugin.h>
#include <vlc_demux.h>
-#include <vlc_codecs.h>
-
/*****************************************************************************
* Module descriptor
*****************************************************************************/
int i;
char *p_line;
- while( *p_pos > p_sys->i_data_peeked )
+ while( *p_pos >= p_sys->i_data_peeked )
{
if( ! Peek( p_demux, false ) )
{
}
else
{
- p_block->i_dts = p_block->i_pts = p_sys->i_time;
+ p_block->i_dts = p_block->i_pts = VLC_TS_0 + p_sys->i_time;
p_sys->i_time += p_sys->i_frame_length;
}
demux_sys_t *p_sys;
int i_size;
bool b_matched = false;
- vlc_value_t val;
+ float f_fps;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
}
- var_Create( p_demux, "mjpeg-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
- var_Get( p_demux, "mjpeg-fps", &val );
+ f_fps = var_CreateGetFloat( p_demux, "mjpeg-fps" );
p_sys->i_frame_length = 0;
/* Check for jpeg file extension */
demux_IsPathExtension( p_demux, ".jpg" ) )
{
p_sys->b_still = true;
- if( val.f_float)
+ if( f_fps )
{
- p_sys->i_still_length = 1000000.0 / val.f_float;
+ p_sys->i_still_length = 1000000.0 / f_fps;
}
else
{
p_sys->i_still_length = 1000000;
}
}
- else if ( val.f_float )
+ else if ( f_fps )
{
- p_sys->i_frame_length = 1000000.0 / val.f_float;
+ p_sys->i_frame_length = 1000000.0 / f_fps;
}
es_format_Init( &p_sys->fmt, VIDEO_ES, 0 );