Mercurial > mplayer.hg
diff libfaad2/ps_syntax.c @ 18141:59b6fa5b4201
Update to faad2 cvs 20040915+MPlayer fixes
Patch by me and Emanuele Giaquinta
| author | rtognimp |
|---|---|
| date | Tue, 18 Apr 2006 19:39:34 +0000 |
| parents | 2ae5ab4331ca |
| children |
line wrap: on
line diff
--- a/libfaad2/ps_syntax.c Tue Apr 18 19:33:46 2006 +0000 +++ b/libfaad2/ps_syntax.c Tue Apr 18 19:39:34 2006 +0000 @@ -22,7 +22,7 @@ ** Commercial non-GPL licensing of this software is possible. ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. ** -** $Id: ps_syntax.c,v 1.3 2004/06/30 12:45:56 menno Exp $ +** $Id: ps_syntax.c,v 1.6 2004/09/04 14:56:28 menno Exp $ **/ #include "common.h" @@ -322,15 +322,21 @@ static INLINE int8_t ps_huff_dec(bitfile *ld, ps_huff_tab t_huff); -uint16_t ps_data(ps_info *ps, bitfile *ld) +uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header) { uint8_t tmp, n; uint16_t bits = (uint16_t)faad_get_processed_bits(ld); + *header = 0; + /* check for new PS header */ if (faad_get1bit(ld DEBUGVAR(1,1000,"ps_data(): enable_ps_header"))) { + *header = 1; + + ps->header_read = 1; + ps->use34hybrid_bands = 0; /* Inter-channel Intensity Difference (IID) parameters enabled */ @@ -372,6 +378,10 @@ DEBUGVAR(1,1005,"ps_data(): enable_ext")); } + /* we are here, but no header has been read yet */ + if (ps->header_read == 0) + return 1; + ps->frame_class = (uint8_t)faad_get1bit(ld DEBUGVAR(1,1006,"ps_data(): frame_class")); tmp = (uint8_t)faad_getbits(ld, 2
