/*****************************************************************************
* pva.c: PVA demuxer
*****************************************************************************
- * Copyright (C) 2004 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2004 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
#include <vlc/vlc.h>
-#include <vlc/input.h>
-
-/* TODO:
- * - ...
- */
+#include <vlc_demux.h>
/*****************************************************************************
* Module descriptor
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
es_format_t fmt;
- uint8_t *p_peek;
+ const uint8_t *p_peek;
if( stream_Peek( p_demux->s, &p_peek, 5 ) < 5 ) return VLC_EGENERIC;
if( p_peek[0] != 'A' || p_peek[1] != 'V' || p_peek[4] != 0x55 )
{
/* In case we had forced this demuxer we try to resynch */
- if( strcasecmp( p_demux->psz_demux, "pva" ) || ReSynch( p_demux ) )
- {
+ if( !p_demux->b_force || ReSynch( p_demux ) )
return VLC_EGENERIC;
- }
}
/* Fill p_demux field */
{
demux_sys_t *p_sys = p_demux->p_sys;
- uint8_t *p_peek;
+ const uint8_t *p_peek;
int i_size;
block_t *p_frame;
int64_t i_pts;
*****************************************************************************/
static int ReSynch( demux_t *p_demux )
{
- uint8_t *p_peek;
+ const uint8_t *p_peek;
int i_skip;
int i_peek;