if( ( i_id == 0x02 || i_id == 0x03 ) && i_size >= 44 && i_lines < MAX_SLICES )
{
- unsigned line_offset = p_block->p_buffer[2] & 0x1f;
- unsigned field_parity = p_block->p_buffer[2] & 0x20;
-
- p_sliced[i_lines].id = VBI_SLICED_TELETEXT_B;
- if( line_offset > 0 )
- p_sliced[i_lines].line = line_offset + (field_parity ? 0 : 313);
- else
- p_sliced[i_lines].line = 0;
- for( int i = 0; i < 42; i++ )
- p_sliced[i_lines].data[i] = vbi_rev8( p_block->p_buffer[4 + i] );
- i_lines++;
+ if(p_block->p_buffer[3] == 0xE4 ) /* framing_code */
+ {
+ unsigned line_offset = p_block->p_buffer[2] & 0x1f;
+ unsigned field_parity = p_block->p_buffer[2] & 0x20;
+
+ p_sliced[i_lines].id = VBI_SLICED_TELETEXT_B;
+ if( line_offset > 0 )
+ p_sliced[i_lines].line = line_offset + (field_parity ? 0 : 313);
+ else
+ p_sliced[i_lines].line = 0;
+ for( int i = 0; i < 42; i++ )
+ p_sliced[i_lines].data[i] = vbi_rev8( p_block->p_buffer[4 + i] );
+ i_lines++;
+ }
}
p_block->i_buffer -= 2 + i_size;
return NULL;
}
- memset( &fmt, 0, sizeof(video_format_t) );
- fmt.i_chroma = b_text ? VLC_CODEC_TEXT : VLC_CODEC_RGBA;
- fmt.i_sar_num = 0;
- fmt.i_sar_den = 1;
+ video_format_Init(&fmt, b_text ? VLC_CODEC_TEXT : VLC_CODEC_RGBA);
if( b_text )
{
fmt.i_bits_per_pixel = 0;
fmt.i_width = fmt.i_visible_width = i_columns * 12;
fmt.i_height = fmt.i_visible_height = i_rows * 10;
fmt.i_bits_per_pixel = 32;
+ fmt.i_sar_num = fmt.i_sar_den = 0; /* let the vout set the correct AR */
}
fmt.i_x_offset = fmt.i_y_offset = 0;
if( p_spu->p_region == NULL )
{
msg_Err( p_dec, "cannot allocate SPU region" );
- decoder_DeleteSubpicture( p_dec, p_spu );
+ subpicture_Delete( p_spu );
return NULL;
}