Changeset 6f9ce7c339bad3306598e2ec77391c6ab27ef29f

Show
Ignore:
Timestamp:
05/12/08 16:56:44 (4 months ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1210604204 -0700
git-parent:

[856853aea9bed47e2e8ca8c425b1fe0995f53b55]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1210604191 -0700
Message:

Commit the good version of the file.
For the ones who wants to look at it, here is a complex script
http://unicorn.us.com/jacosub/demo.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/subtitle.c

    rf3bd025 r6f9ce7c  
    13741374        if( !s ) 
    13751375            return VLC_EGENERIC; 
    1376  
    1377         if( sscanf (s, "FORMAT=TIM%c", &p_dummy ) == 1 && p_dummy == 'E') 
    1378         { 
    1379             mpsub_factor = 100.0; 
    1380             break; 
    1381         } 
    1382  
    1383         psz_temp = malloc( strlen(s) - 6 ); 
    1384         if( sscanf( s, "FORMAT=%[^\r\n]", psz_temp ) ) 
    1385         { 
    1386             float f_fps; 
    1387             f_fps = us_strtod( psz_temp, NULL ); 
    1388             if( f_fps > 0.0 && var_GetFloat( p_demux, "sub-fps" ) <= 0.0 ) 
    1389                 var_SetFloat( p_demux, "sub-fps", f_fps ); 
    1390  
    1391             mpsub_factor = 1.0; 
     1376        if( strstr( s, "FORMAT" ) ) 
     1377        { 
     1378            if( sscanf (s, "FORMAT=TIM%c", &p_dummy ) == 1 && p_dummy == 'E') 
     1379            { 
     1380                mpsub_factor = 100.0; 
     1381                break; 
     1382            } 
     1383 
     1384            psz_temp = malloc( strlen(s) ); 
     1385            if( sscanf( s, "FORMAT=%[^\r\n]", psz_temp ) ) 
     1386            { 
     1387                float f_fps; 
     1388                f_fps = us_strtod( psz_temp, NULL ); 
     1389                if( f_fps > 0.0 && var_GetFloat( p_demux, "sub-fps" ) <= 0.0 ) 
     1390                    var_SetFloat( p_demux, "sub-fps", f_fps ); 
     1391 
     1392                mpsub_factor = 1.0; 
     1393                free( psz_temp ); 
     1394                break; 
     1395            } 
    13921396            free( psz_temp ); 
    1393             break; 
    1394         } 
    1395         free( psz_temp ); 
    1396  
     1397        } 
    13971398        /* Data Lines */ 
    13981399        if( sscanf (s, "%f %f", &f1, &f2 ) == 2 ) 
     
    16171618                    while ( *s2 == ' ' ) s2++; 
    16181619 
    1619 /*                    int i_len = strlen( psz_orig2 ); 
    1620  
    1621  
    1622                     psz_orig2 = realloc( psz_orig2, strlen( s2 ) +  i_len + 1 ); 
    1623  
    1624  
     1620                    /* Here to parse the second line, we should add s2 to 
     1621                       psz_text and go on the for( ) line 1556 in order to 
     1622                       parse the next line. 
    16251623                    */ 
    16261624                }