Changeset 2e1cf451fa5cca785451c97aaea55fd4f7e14d95
- Timestamp:
- 07/09/04 11:34:03
(4 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1094549643 +0000
- git-parent:
[f9701bc54aa3779d0188761f26f5bb507b1692e3]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1094549643 +0000
- Message:
* src/input/decoder.c, modules/codec/faad.c: work around another bug in libfaad with ADTS streams.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r779340c |
r2e1cf45 |
|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| 8 | | * Gildas Bazin <gbazin@netcourrier.com> |
|---|
| | 8 | * Gildas Bazin <gbazin@videolan.org> |
|---|
| 9 | 9 | * |
|---|
| 10 | 10 | * This program is free software; you can redistribute it and/or modify |
|---|
| … | … | |
| 201 | 201 | } |
|---|
| 202 | 202 | |
|---|
| | 203 | if( p_dec->fmt_out.audio.i_rate == 0 && p_dec->fmt_in.i_extra > 0 ) |
|---|
| | 204 | { |
|---|
| | 205 | /* We have a decoder config so init the handle */ |
|---|
| | 206 | unsigned long i_rate; |
|---|
| | 207 | unsigned char i_channels; |
|---|
| | 208 | |
|---|
| | 209 | if( faacDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra, |
|---|
| | 210 | p_dec->fmt_in.i_extra, |
|---|
| | 211 | &i_rate, &i_channels ) >= 0 ) |
|---|
| | 212 | { |
|---|
| | 213 | p_dec->fmt_out.audio.i_rate = i_rate; |
|---|
| | 214 | p_dec->fmt_out.audio.i_channels = i_channels; |
|---|
| | 215 | aout_DateInit( &p_sys->date, i_rate ); |
|---|
| | 216 | } |
|---|
| | 217 | } |
|---|
| | 218 | |
|---|
| 203 | 219 | if( p_dec->fmt_out.audio.i_rate == 0 && p_sys->i_buffer ) |
|---|
| 204 | 220 | { |
|---|
| … | … | |
| 308 | 324 | break; |
|---|
| 309 | 325 | } |
|---|
| | 326 | } |
|---|
| | 327 | |
|---|
| | 328 | if( j == MAX_CHANNEL_POSITIONS ) |
|---|
| | 329 | { |
|---|
| | 330 | msg_Warn( p_dec, "unknow channel ordering" ); |
|---|
| | 331 | block_Release( p_block ); |
|---|
| | 332 | return NULL; |
|---|
| 310 | 333 | } |
|---|
| 311 | 334 | } |
|---|
| r8ca6f29 |
r2e1cf45 |
|
| 590 | 590 | p_packetizer->pf_packetize( p_packetizer, &p_block )) ) |
|---|
| 591 | 591 | { |
|---|
| | 592 | if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra ) |
|---|
| | 593 | { |
|---|
| | 594 | p_dec->fmt_in.i_extra = p_packetizer->fmt_out.i_extra; |
|---|
| | 595 | p_dec->fmt_in.p_extra = malloc( p_dec->fmt_in.i_extra ); |
|---|
| | 596 | memcpy( p_dec->fmt_in.p_extra, |
|---|
| | 597 | p_packetizer->fmt_out.p_extra, |
|---|
| | 598 | p_dec->fmt_in.i_extra ); |
|---|
| | 599 | } |
|---|
| | 600 | |
|---|
| 592 | 601 | while( p_packetized_block ) |
|---|
| 593 | 602 | { |
|---|