Changeset 57e0c5518d887ce02592d64797a813f515a709db

Show
Ignore:
Timestamp:
18/01/04 04:43:03 (5 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1074397383 +0000
git-parent:

[434eb0903feb4c5b8f57c6c8cf3bce89d7248d63]

git-author:
Laurent Aimar <fenrir@videolan.org> 1074397383 +0000
Message:
  • duplicate: corrected behavour of no-*.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/stream_out/duplicate.c

    r3a60f49 r57e0c55  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: duplicate.c,v 1.9 2004/01/18 02:20:28 fenrir Exp $ 
     5 * $Id: duplicate.c,v 1.10 2004/01/18 03:43:03 fenrir Exp $ 
    66 * 
    77 * Author: Laurent Aimar <fenrir@via.ecp.fr> 
     
    368368            !strncmp( psz, "noaudio", strlen( "noaudio" ) ) ) 
    369369        { 
    370             if( fmt->i_cat == AUDIO_ES ) 
    371             { 
    372                 i_cat = 0; 
    373                 break; 
     370            if( i_cat != 1 ) 
     371            { 
     372                i_cat = fmt->i_cat != AUDIO_ES ? 1 : 0; 
    374373            } 
    375374        } 
     
    377376                 !strncmp( psz, "novideo", strlen( "novideo" ) ) ) 
    378377        { 
    379             if( fmt->i_cat == VIDEO_ES ) 
    380             { 
    381                 i_cat = 0; 
    382                 break; 
     378            if( i_cat != 1 ) 
     379            { 
     380                i_cat = fmt->i_cat != VIDEO_ES ? 1 : 0; 
    383381            } 
    384382        } 
     
    386384                 !strncmp( psz, "nospu", strlen( "nospu" ) ) ) 
    387385        { 
    388             if( fmt->i_cat == SPU_ES ) 
    389             { 
    390                 i_cat = 0; 
    391                 break; 
     386            if( i_cat != 1 ) 
     387            { 
     388                i_cat = fmt->i_cat != SPU_ES ? 1 : 0; 
    392389            } 
    393390        } 
     
    420417            if( !strcmp( psz, "no-es" ) || !strcmp( psz, "es" ) ) 
    421418            { 
    422                 if( !NumInRange( psz_arg, i_es_number )
     419                if( i_es != 1
    423420                { 
    424                     i_es = 0; 
    425                     break; 
     421                    i_es = !NumInRange( psz_arg, i_es_number ) ? 1 : 0; 
    426422                } 
    427423            } 
     
    436432                      !strcmp( psz, "no-program" ) || !strcmp( psz, "noprogram" ) ) 
    437433            { 
    438                 if( fmt->i_group >= 0 && !NumInRange( psz_arg, fmt->i_group )
     434                if( fmt->i_group >= 0 && i_prgm != 1
    439435                { 
    440                     i_prgm = 0; 
    441                     break; 
     436                    i_prgm = !NumInRange( psz_arg, fmt->i_group ) ? 1 : 0; 
    442437                } 
    443438            } 
    444             else if( !strcmp( psz, "program" ) || !strcmp( psz, "program" ) ) 
     439            else if( !strcmp( psz, "prgm" ) || !strcmp( psz, "program" ) ) 
    445440            { 
    446441                if( fmt->i_group >= 0 && i_prgm != 1 )