+static int sub_Vplayer( FILE *p_file, subtitle_t *p_subtitle, mtime_t i_microsecperframe)
+{
+ /*
+ * each line:
+ * h:m:s:Line1|Line2|Line3....
+ * or
+ * h:m:s Line1|Line2|Line3....
+ * where n1 and n2 are the video frame number...
+ *
+ */
+ char buffer[MAX_LINE + 1];
+ char buffer_text[MAX_LINE + 1];
+ mtime_t i_start;
+ unsigned int i;
+
+ for( ;; )
+ {
+ int h, m, s;
+ char c;
+
+ if( fgets( buffer, MAX_LINE, p_file ) <= 0)
+ {
+ return( -1 );
+ }
+ i_start = 0;
+
+ buffer[MAX_LINE] = '\0';
+ memset( buffer_text, '\0', MAX_LINE );
+ if( sscanf( buffer, "%d:%d:%d%[ :]%[^\r\n]", &h, &m, &s, &c, buffer_text ) == 5 )
+ {
+ i_start = ( (mtime_t)h * 3600*1000 +
+ (mtime_t)m * 60*1000 +
+ (mtime_t)s * 1000 ) * 1000;
+ break;
+ }
+ }
+
+ /* replace | by \n */
+ for( i = 0; i < strlen( buffer_text ); i++ )
+ {
+ if( buffer_text[i] == '|' )
+ {
+ buffer_text[i] = '\n';
+ }
+ }
+ p_subtitle->i_start = i_start;
+
+ p_subtitle->i_stop = 0;
+ p_subtitle->psz_text = strndup( buffer_text, MAX_LINE );
+ return( 0 );
+}