Commit 84b053b6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- seeking in .VOC file

parent 52928929
...@@ -57,11 +57,7 @@ struct demux_sys_t ...@@ -57,11 +57,7 @@ struct demux_sys_t
es_format_t fmt; es_format_t fmt;
es_out_id_t *p_es; es_out_id_t *p_es;
#if 0 int64_t i_block_offset;
int64_t i_data_offset;
unsigned int i_data_size;
#endif
int32_t i_block_size; int32_t i_block_size;
date_t pts; date_t pts;
...@@ -215,6 +211,8 @@ static int Open( vlc_object_t * p_this ) ...@@ -215,6 +211,8 @@ static int Open( vlc_object_t * p_this )
msg_Dbg( p_demux, "Unsupported block type %u", (unsigned)*p_buf); msg_Dbg( p_demux, "Unsupported block type %u", (unsigned)*p_buf);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_sys->i_block_offset = stream_Tell( p_demux->s );
p_sys->fmt.i_extra = 0; p_sys->fmt.i_extra = 0;
p_sys->fmt.p_extra = NULL; p_sys->fmt.p_extra = NULL;
...@@ -247,18 +245,16 @@ static int Demux( demux_t *p_demux ) ...@@ -247,18 +245,16 @@ static int Demux( demux_t *p_demux )
{ {
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block; block_t *p_block;
#if 0
int64_t i_offset; int64_t i_offset;
i_offset = stream_Tell( p_demux->s ); i_offset = stream_Tell( p_demux->s );
if( p_sys->i_data_size > 0 && if( i_offset >= p_sys->i_block_offset + p_sys->i_block_size )
i_offset >= p_sys->i_data_offset + p_sys->i_data_size )
{ {
/* EOF */ /* EOF */
return 0; return 0;
} }
#endif
p_block = stream_Block( p_demux->s, p_sys->fmt.audio.i_bytes_per_frame ); p_block = stream_Block( p_demux->s, p_sys->fmt.audio.i_bytes_per_frame );
if( p_block == NULL ) if( p_block == NULL )
{ {
...@@ -293,10 +289,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -293,10 +289,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{ {
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
if( i_query == DEMUX_SET_POSITION ) return demux2_vaControlHelper( p_demux->s, p_sys->i_block_offset,
return VLC_EGENERIC; /* not implemented yet */ p_sys->i_block_offset + p_sys->i_block_size,
p_sys->fmt.i_bitrate,
return demux2_vaControlHelper( p_demux->s, 0, -1, p_sys->fmt.i_bitrate,
p_sys->fmt.audio.i_blockalign, p_sys->fmt.audio.i_blockalign,
i_query, args ); i_query, args );
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment