/*****************************************************************************
* vc1.c : VC1 Video demuxer
*****************************************************************************
- * Copyright (C) 2002-2004 the VideoLAN team
+ * Copyright (C) 2002-2004 VLC authors and VideoLAN
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_demux.h>
-#include "vlc_codec.h"
+#include <vlc_codec.h>
/*****************************************************************************
* Module descriptor
set_subcategory( SUBCAT_INPUT_DEMUX )
set_description( N_("VC1 video demuxer" ) )
set_capability( "demux", 0 )
- add_float( "vc1-fps", 25.0, NULL, FPS_TEXT, FPS_LONGTEXT, true )
+ add_float( "vc1-fps", 25.0, FPS_TEXT, FPS_LONGTEXT, true )
set_callbacks( Open, Close )
add_shortcut( "vc1" )
vlc_module_end ()
"continuing anyway" );
}
+ p_sys = malloc( sizeof( demux_sys_t ) );
+ if( unlikely(p_sys == NULL) )
+ return VLC_ENOMEM;
+
p_demux->pf_demux = Demux;
p_demux->pf_control= Control;
- p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
+ p_demux->p_sys = p_sys;
p_sys->p_es = NULL;
- p_sys->i_dts = 1;
+ p_sys->i_dts = 0;
p_sys->f_fps = var_CreateGetFloat( p_demux, "vc1-fps" );
if( p_sys->f_fps < 0.001 )
p_sys->f_fps = 0.0;
return 0;
/* */
- p_block_in->i_dts = 1;
- p_block_in->i_pts = 1;
+ p_block_in->i_dts = VLC_TS_0;
+ p_block_in->i_pts = VLC_TS_0;
while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer, &p_block_in )) )
{
p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
}
- es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_dts );
- p_block_out->i_dts = p_sys->i_dts;
- p_block_out->i_pts = p_sys->i_dts;
+ es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_dts );
+ p_block_out->i_dts = VLC_TS_0 + p_sys->i_dts;
+ p_block_out->i_pts = VLC_TS_0 + p_sys->i_dts;
es_out_Send( p_demux->out, p_sys->p_es, p_block_out );