Ticket #3545: mythmusic_flac_decoder_state.diff
File mythmusic_flac_decoder_state.diff, 2.5 KB (added by , 17 years ago) |
---|
-
mythplugins/mythmusic/mythmusic/flacdecoder.cpp
342 342 flacok = decoder_process_single(decoder); 343 343 decoderstate = decoder_get_state(decoder); 344 344 345 if (decoderstate == 0 || decoderstate == 1) 345 if (decoderstate == STREAM_DECODER_SEARCH_FOR_METADATA || 346 decoderstate == STREAM_DECODER_READ_METADATA || 347 decoderstate == STREAM_DECODER_SEARCH_FOR_FRAME_SYNC || 348 decoderstate == STREAM_DECODER_READ_FRAME ) 346 349 { 347 350 if (output()) 348 351 flush(); 349 } 350 else 352 } 353 else 351 354 { 355 // some error condition occurred, so exit the loop 356 352 357 flush(TRUE); 353 358 354 if (output()) { 355 output()->Drain(); 356 } 359 if (output()) 360 output()->Drain(); 357 361 358 362 done = TRUE; 359 if (!user_stop) {363 if (!user_stop) 360 364 finish = TRUE; 361 }362 365 } 363 366 364 367 unlock(); -
mythplugins/mythmusic/mythmusic/flacdecoder.h
42 42 #define decoder_process_single FLAC__seekable_stream_decoder_process_single 43 43 #define decoder_get_state FLAC__seekable_stream_decoder_get_state 44 44 #define bytesSize unsigned 45 #define STREAM_DECODER_SEARCH_FOR_METADATA FLAC__SEEKABLE_STREAM_DECODER_OK 46 #define STREAM_DECODER_READ_METADATA FLAC__SEEKABLE_STREAM_DECODER_OK 47 #define STREAM_DECODER_SEARCH_FOR_FRAME_SYNC FLAC__SEEKABLE_STREAM_DECODER_OK 48 #define STREAM_DECODER_READ_FRAME FLAC__SEEKABLE_STREAM_DECODER_OK 45 49 #else 46 50 /* FLAC 1.1.3 and up */ 47 51 #define NEWFLAC … … 71 75 #define decoder_process_single FLAC__stream_decoder_process_single 72 76 #define decoder_get_state FLAC__stream_decoder_get_state 73 77 #define bytesSize size_t 78 #define STREAM_DECODER_SEARCH_FOR_METADATA FLAC__STREAM_DECODER_SEARCH_FOR_METADATA 79 #define STREAM_DECODER_READ_METADATA FLAC__STREAM_DECODER_READ_METADATA 80 #define STREAM_DECODER_SEARCH_FOR_FRAME_SYNC FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC 81 #define STREAM_DECODER_READ_FRAME FLAC__STREAM_DECODER_READ_FRAME 74 82 #endif 75 83 76 84 #include "decoder.h"