Ticket #5687: libs_libmythtv-missing-break.patch

File libs_libmythtv-missing-break.patch, 947 bytes (added by Erik Hovland <erik@…>, 12 years ago)

reworks switch/case to be a bit more efficient

  • mythtv/libs/libmythtv/util-xvmc.h

    case statements without breaks could be defects
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libmythtv/util-xvmc.h |    7 ++++---
     1 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/util-xvmc.h b/mythtv/libs/libmythtv/util-xvmc.h
    index 0d11f68..8303344 100644
    a b static uint calcBPM(int chroma) 
    3434    int ret;
    3535    switch (chroma)
    3636    {
    37         case XVMC_CHROMA_FORMAT_420: ret = 6;
    38         case XVMC_CHROMA_FORMAT_422: ret = 4+2;
    39         case XVMC_CHROMA_FORMAT_444: ret = 4+4;
     37        case XVMC_CHROMA_FORMAT_444: ret = 4+4; break;
     38        // these cases should all return 6
     39        case XVMC_CHROMA_FORMAT_420:
     40        case XVMC_CHROMA_FORMAT_422:
    4041        default: ret = 6;
    4142        // default unless gray, then 4 is the right number,
    4243        // a bigger number just wastes a little memory.