Changeset 662af912f9048257516fec844925f937db85dff6

Show
Ignore:
Timestamp:
21/11/03 13:18:54 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1069417134 +0000
git-parent:

[9b889a6a3d40788f6a6d9048cbb12455243cd938]

git-author:
Gildas Bazin <gbazin@videolan.org> 1069417134 +0000
Message:

* modules/demux/flac.c, modules/codec/flac.c: couple of fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/flac.c

    r40c4b64 r662af91  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: flac.c,v 1.1 2003/11/21 01:45:48 gbazin Exp $ 
     5 * $Id: flac.c,v 1.2 2003/11/21 12:18:54 gbazin Exp $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    405405            decoder_state_error( p_dec, 
    406406                FLAC__stream_decoder_get_state( p_sys->p_flac ) ); 
     407            FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); 
    407408        } 
     409 
     410        /* If the decoder is in the "aborted" state, 
     411         * FLAC__stream_decoder_process_single() won't return an error. */ 
     412        if( FLAC__stream_decoder_get_state(p_dec->p_sys->p_flac) 
     413            == FLAC__STREAM_DECODER_ABORTED ) 
     414        { 
     415            FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); 
     416        } 
     417 
    408418        block_Release( p_sys->p_block ); 
    409419    } 
     
    435445    decoder_sys_t *p_sys = p_dec->p_sys; 
    436446 
    437     msg_Err( p_dec, "buffer: %i", p_sys->p_block->i_buffer ); 
    438447    if( p_sys->p_block && p_sys->p_block->i_buffer ) 
    439448    { 
     
    571580        msg_Err( p_dec, "got decoder error: %d", status ); 
    572581    } 
     582 
     583    FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); 
    573584    return; 
    574585} 
     
    634645        msg_Err( p_dec, "The decoder encountered reserved fields in use " 
    635646                 "in the stream." ); 
    636         FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); 
    637647        break; 
    638648    case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR: 
  • modules/demux/flac.c

    r40c4b64 r662af91  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: flac.c,v 1.6 2003/11/21 01:45:48 gbazin Exp $ 
     5 * $Id: flac.c,v 1.7 2003/11/21 12:18:54 gbazin Exp $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    132132                    VLC_FOURCC( 'f', 'l', 'a', 'c' ) ); 
    133133 
    134     /* Store STREAMINFO for the decoder an packetizer */ 
     134    /* Store STREAMINFO for the decoder and packetizer */ 
    135135    p_sys->p_packetizer->fmt_in.i_extra = fmt.i_extra = STREAMINFO_SIZE; 
    136136    p_sys->p_packetizer->fmt_in.p_extra = malloc( STREAMINFO_SIZE ); 
     
    138138                 STREAMINFO_SIZE ); 
    139139 
    140     /* Fake this a the last metadata block */ 
     140    /* Fake this as the last metadata block */ 
    141141    ((uint8_t*)p_sys->p_packetizer->fmt_in.p_extra)[0] |= 0x80; 
    142142    fmt.p_extra = malloc( STREAMINFO_SIZE ); 
     
    180180 
    181181    /* Unneed module */ 
    182     module_Unneed( p_input, p_sys->p_packetizer->p_module ); 
     182    module_Unneed( p_sys->p_packetizer, p_sys->p_packetizer->p_module ); 
    183183 
    184184    if( p_sys->p_packetizer->fmt_in.p_extra )