Commit 10188644 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* mkv.cpp: retrieve the original framesize from the vobsub idx and store in es_format_t

* vobsub.c: rewrite of the vobsub module. Now has track support. This is UNFINISHED.
  TODO, repair the 'Control' commands store the timestamp/location combo's in the arrays of subtitle_t structs

  and find a way to pass the info from the decoder to the core of course....
parent bb7ae8b6
...@@ -645,6 +645,25 @@ static int Open( vlc_object_t * p_this ) ...@@ -645,6 +645,25 @@ static int Open( vlc_object_t * p_this )
else if( !strcmp( tk.psz_codec, "S_VOBSUB" ) ) else if( !strcmp( tk.psz_codec, "S_VOBSUB" ) )
{ {
tk.fmt.i_codec = VLC_FOURCC( 's','p','u',' ' ); tk.fmt.i_codec = VLC_FOURCC( 's','p','u',' ' );
if( tk.i_extra_data )
{
char *p_start;
char *p_buf = (char *)malloc( tk.i_extra_data + 1);
memcpy( p_buf, tk.p_extra_data , tk.i_extra_data );
p_buf[tk.i_extra_data] = '\0';
p_start = strstr( p_buf, "size:" );
if( sscanf( p_start, "size: %dx%d",
&tk.fmt.subs.spu.i_original_frame_width, &tk.fmt.subs.spu.i_original_frame_height ) == 2 )
{
msg_Dbg( p_demux, "original frame size vobsubs: %dx%d", tk.fmt.subs.spu.i_original_frame_width, tk.fmt.subs.spu.i_original_frame_height );
}
else
{
msg_Warn( p_demux, "reading original frame size for vobsub failed" );
}
free( p_buf );
}
} }
else else
{ {
......
This diff is collapsed.
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