/*****************************************************************************
* a52.c : raw A/52 stream input module for vlc
*****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: a52.c,v 1.7 2004/03/03 11:40:19 fenrir Exp $
+ * Copyright (C) 2001 the VideoLAN team
+ * $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
* 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.
*****************************************************************************/
/*****************************************************************************
static void Close ( vlc_object_t * );
vlc_module_begin();
+ set_category( CAT_INPUT );
+ set_subcategory( SUBCAT_INPUT_DEMUX );
set_description( _("Raw A/52 demuxer") );
set_capability( "demux2", 145 );
set_callbacks( Open, Close );
demux_sys_t *p_sys;
byte_t *p_peek;
int i_peek = 0;
- vlc_bool_t b_big_endian;
+ vlc_bool_t b_big_endian = 0; /* Arbitrary initialisation */
/* Check if we are dealing with a WAV file */
if( stream_Peek( p_demux->s, &p_peek, 12 ) == 12 &&
- !strncmp( p_peek, "RIFF", 4 ) && !strncmp( &p_peek[8], "WAVE", 4 ) )
+ !memcmp( p_peek, "RIFF", 4 ) && !memcmp( p_peek + 8, "WAVE", 4 ) )
{
int i_size;
/* Skip the wave header */
i_peek = 12 + 8;
while( stream_Peek( p_demux->s, &p_peek, i_peek ) == i_peek &&
- strncmp( p_peek + i_peek - 8, "data", 4 ) )
+ memcmp( p_peek + i_peek - 8, "data", 4 ) )
{
i_peek += GetDWLE( p_peek + i_peek - 4 ) + 8;
}
VLC_FOURCC( 'a', '5', '2', ' ' ) );
p_sys->p_packetizer->p_module =
- module_Need( p_sys->p_packetizer, "packetizer", NULL );
+ module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module )
{
msg_Err( p_demux, "cannot find A52 packetizer" );
static int Control( demux_t *p_demux, int i_query, va_list args )
{
demux_sys_t *p_sys = p_demux->p_sys;
- return demux2_vaControlHelper( p_demux->s,
- 0, -1,
- 8*p_sys->i_mux_rate, 1, i_query, args );
+ if( i_query == DEMUX_SET_TIME )
+ return VLC_EGENERIC;
+ else
+ return demux2_vaControlHelper( p_demux->s,
+ 0, -1,
+ 8*p_sys->i_mux_rate, 1, i_query, args );
}
/*****************************************************************************