Changeset 662af912f9048257516fec844925f937db85dff6
- 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
| r40c4b64 |
r662af91 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Gildas Bazin <gbazin@netcourrier.com> |
|---|
| … | … | |
| 405 | 405 | decoder_state_error( p_dec, |
|---|
| 406 | 406 | FLAC__stream_decoder_get_state( p_sys->p_flac ) ); |
|---|
| | 407 | FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); |
|---|
| 407 | 408 | } |
|---|
| | 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 | |
|---|
| 408 | 418 | block_Release( p_sys->p_block ); |
|---|
| 409 | 419 | } |
|---|
| … | … | |
| 435 | 445 | decoder_sys_t *p_sys = p_dec->p_sys; |
|---|
| 436 | 446 | |
|---|
| 437 | | msg_Err( p_dec, "buffer: %i", p_sys->p_block->i_buffer ); |
|---|
| 438 | 447 | if( p_sys->p_block && p_sys->p_block->i_buffer ) |
|---|
| 439 | 448 | { |
|---|
| … | … | |
| 571 | 580 | msg_Err( p_dec, "got decoder error: %d", status ); |
|---|
| 572 | 581 | } |
|---|
| | 582 | |
|---|
| | 583 | FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); |
|---|
| 573 | 584 | return; |
|---|
| 574 | 585 | } |
|---|
| … | … | |
| 634 | 645 | msg_Err( p_dec, "The decoder encountered reserved fields in use " |
|---|
| 635 | 646 | "in the stream." ); |
|---|
| 636 | | FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); |
|---|
| 637 | 647 | break; |
|---|
| 638 | 648 | case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR: |
|---|
| r40c4b64 |
r662af91 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Gildas Bazin <gbazin@netcourrier.com> |
|---|
| … | … | |
| 132 | 132 | VLC_FOURCC( 'f', 'l', 'a', 'c' ) ); |
|---|
| 133 | 133 | |
|---|
| 134 | | /* Store STREAMINFO for the decoder an packetizer */ |
|---|
| | 134 | /* Store STREAMINFO for the decoder and packetizer */ |
|---|
| 135 | 135 | p_sys->p_packetizer->fmt_in.i_extra = fmt.i_extra = STREAMINFO_SIZE; |
|---|
| 136 | 136 | p_sys->p_packetizer->fmt_in.p_extra = malloc( STREAMINFO_SIZE ); |
|---|
| … | … | |
| 138 | 138 | STREAMINFO_SIZE ); |
|---|
| 139 | 139 | |
|---|
| 140 | | /* Fake this a the last metadata block */ |
|---|
| | 140 | /* Fake this as the last metadata block */ |
|---|
| 141 | 141 | ((uint8_t*)p_sys->p_packetizer->fmt_in.p_extra)[0] |= 0x80; |
|---|
| 142 | 142 | fmt.p_extra = malloc( STREAMINFO_SIZE ); |
|---|
| … | … | |
| 180 | 180 | |
|---|
| 181 | 181 | /* 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 ); |
|---|
| 183 | 183 | |
|---|
| 184 | 184 | if( p_sys->p_packetizer->fmt_in.p_extra ) |
|---|