/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <vlc/vlc.h>
#include <vlc_demux.h>
vlc_module_begin();
set_shortname( "DV" );
set_description( _("DV (Digital Video) demuxer") );
- set_capability( "demux2", 2 );
+ set_capability( "demux2", 3 );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
add_bool( "rawdv-hurry-up", 0, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT, VLC_FALSE );
uint32_t i_dword;
dv_header_t dv_header;
dv_id_t dv_id;
- char *psz_ext;
/* It isn't easy to recognize a raw DV stream. The chances that we'll
* mistake a stream from another type for a raw DV stream are too high, so
* it is possible to force this demux. */
/* Check for DV file extension */
- psz_ext = strrchr( p_demux->psz_path, '.' );
- if( ( !psz_ext || strcasecmp( psz_ext, ".dv") ) &&
- strcmp(p_demux->psz_demux, "rawdv") )
- {
+ if( !demux2_IsPathExtension( p_demux, ".dv" ) && !p_demux->b_force )
return VLC_EGENERIC;
- }
if( stream_Peek( p_demux->s, &p_peek, DV_PAL_FRAME_SIZE ) <
DV_NTSC_FRAME_SIZE )