Mercurial > libavformat.hg
changeset 3238:db733a434b2c libavformat
change ff_ac3_parse_header() to take a GetBitContext instead of const char*
author | bwolowiec |
---|---|
date | Tue, 22 Apr 2008 11:14:01 +0000 |
parents | 4fa7ec10b57e |
children | 319a613c1dd7 |
files | raw.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/raw.c Mon Apr 21 15:20:53 2008 +0000 +++ b/raw.c Tue Apr 22 11:14:01 2008 +0000 @@ -23,6 +23,7 @@ #include "ac3_parser.h" #include "raw.h" #include "crc.h" +#include "bitstream.h" #ifdef CONFIG_MUXERS /* simple formats */ @@ -419,6 +420,7 @@ int max_frames, first_frames = 0, frames; uint8_t *buf, *buf2, *end; AC3HeaderInfo hdr; + GetBitContext gbc; max_frames = 0; buf = p->buf; @@ -428,7 +430,8 @@ buf2 = buf; for(frames = 0; buf2 < end; frames++) { - if(ff_ac3_parse_header(buf2, &hdr) < 0) + init_get_bits(&gbc, buf2, 54); + if(ff_ac3_parse_header(&gbc, &hdr) < 0) break; if(buf2 + hdr.frame_size > end || av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))