Ticket #3545: mythmusic-flac-1.1.4.patch

File mythmusic-flac-1.1.4.patch, 1.3 KB (added by james_defelice@…, 5 years ago)

patch for flacdecoder.cpp

  • flacdecoder.cpp

     
    342342        flacok = decoder_process_single(decoder); 
    343343        decoderstate = decoder_get_state(decoder); 
    344344 
    345         if (decoderstate == 0 || decoderstate == 1) 
    346         { 
     345        switch(decoderstate) { 
     346 
     347        case FLAC__STREAM_DECODER_SEARCH_FOR_METADATA: 
     348        /** The decoder is ready to search for metadata. */ 
     349 
     350        case FLAC__STREAM_DECODER_READ_METADATA: 
     351        /** The decoder is ready to or is in the process of reading metadata. */ 
     352 
     353        case FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC: 
     354        /** The decoder is ready to or is in the process of searching for the 
     355         * frame sync code. 
     356         */ 
     357 
     358        case FLAC__STREAM_DECODER_READ_FRAME: 
     359        /** The decoder is ready to or is in the process of reading a frame. */ 
     360 
    347361            if (output()) 
    348362                flush(); 
    349         }  
    350         else  
    351         { 
     363            break; 
     364 
     365        default: 
     366        // some error condition occurred, so exit the loop 
     367 
    352368            flush(TRUE); 
    353369 
    354370            if (output()) { 
     
    359375            if (!user_stop) { 
    360376                finish = TRUE; 
    361377            } 
    362         } 
    363378 
     379        } // switch(decoderstate) 
     380 
    364381        unlock(); 
    365382    } 
    366383