Commit bf7d6ce0 authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Compiler fixes.

parent 6521130d
...@@ -78,7 +78,7 @@ vlc_module_begin(); ...@@ -78,7 +78,7 @@ vlc_module_begin();
set_category( CAT_INPUT ); set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_SCODEC ); set_subcategory( SUBCAT_INPUT_SCODEC );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
add_integer( "vbi-page", 100, NULL, add_integer( "vbi-page", 100, NULL,
PAGE_TEXT, PAGE_LONGTEXT, VLC_FALSE ); PAGE_TEXT, PAGE_LONGTEXT, VLC_FALSE );
add_bool( "vbi-opaque", VLC_TRUE, NULL, add_bool( "vbi-opaque", VLC_TRUE, NULL,
...@@ -119,6 +119,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -119,6 +119,7 @@ static int Open( vlc_object_t *p_this )
if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','e','l','x') ) if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','e','l','x') )
{ {
msg_Err( p_dec, "fourcc not supported" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -137,7 +138,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -137,7 +138,7 @@ static int Open( vlc_object_t *p_this )
if( (p_sys->p_vbi_dec == NULL) || (p_sys->p_dvb_demux == NULL) ) if( (p_sys->p_vbi_dec == NULL) || (p_sys->p_dvb_demux == NULL) )
{ {
msg_Err( p_dec, "VBI decoder/demux could not be created." ); msg_Err( p_dec, "VBI decoder/demux could not be created." );
Close( p_dec ); Close( p_this );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
vbi_event_handler_register( p_sys->p_vbi_dec, vbi_event_handler_register( p_sys->p_vbi_dec,
...@@ -180,7 +181,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -180,7 +181,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
vlc_bool_t b_cached = VLC_FALSE; vlc_bool_t b_cached = VLC_FALSE;
vbi_page p_page; vbi_page p_page;
uint8_t *p_pos; const uint8_t *p_pos;
unsigned int i_left; unsigned int i_left;
/* part of kludge */ /* part of kludge */
uint32_t *p_begin, *p_end; uint32_t *p_begin, *p_end;
...@@ -190,6 +191,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -190,6 +191,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
if( (pp_block == NULL) || (*pp_block == NULL) ) if( (pp_block == NULL) || (*pp_block == NULL) )
return NULL; return NULL;
p_block = *pp_block; p_block = *pp_block;
*pp_block = NULL; *pp_block = NULL;
...@@ -200,7 +202,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -200,7 +202,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
{ {
vbi_sliced p_sliced[MAX_SLICES]; vbi_sliced p_sliced[MAX_SLICES];
unsigned int i_lines = 0; unsigned int i_lines = 0;
int64_t i_pts; int64_t i_pts = 0;
i_lines = vbi_dvb_demux_cor( p_sys->p_dvb_demux, p_sliced, i_lines = vbi_dvb_demux_cor( p_sys->p_dvb_demux, p_sliced,
MAX_SLICES, &i_pts, &p_pos, &i_left ); MAX_SLICES, &i_pts, &p_pos, &i_left );
...@@ -210,6 +212,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -210,6 +212,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
} }
/* Try to see if the page we want is in the cache yet */ /* Try to see if the page we want is in the cache yet */
memset( &p_page, 0, sizeof( vbi_page ) );
b_cached = vbi_fetch_vt_page( p_sys->p_vbi_dec, &p_page, b_cached = vbi_fetch_vt_page( p_sys->p_vbi_dec, &p_page,
vbi_dec2bcd( p_sys->i_wanted_page ), vbi_dec2bcd( p_sys->i_wanted_page ),
VBI_ANY_SUBNO, VBI_WST_LEVEL_3p5, VBI_ANY_SUBNO, VBI_WST_LEVEL_3p5,
...@@ -300,7 +303,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -300,7 +303,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
default: default:
break; break;
} }
x++; x++;
if( x >= fmt.i_width ) if( x >= fmt.i_width )
{ {
x = 0; x = 0;
...@@ -332,12 +335,11 @@ error: ...@@ -332,12 +335,11 @@ error:
p_dec->pf_spu_buffer_del( p_dec, p_spu ); p_dec->pf_spu_buffer_del( p_dec, p_spu );
p_spu = NULL; p_spu = NULL;
} }
block_Release( p_block ); block_Release( p_block );
return NULL; return NULL;
} }
static void event_handler( vbi_event *ev, void *user_data) static void event_handler( vbi_event *ev, void *user_data )
{ {
decoder_t *p_dec = (decoder_t *)user_data; decoder_t *p_dec = (decoder_t *)user_data;
decoder_sys_t *p_sys = p_dec->p_sys; decoder_sys_t *p_sys = p_dec->p_sys;
......
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