diff options
author | Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> | 2008-04-22 11:14:01 +0000 |
---|---|---|
committer | Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> | 2008-04-22 11:14:01 +0000 |
commit | 55736cfbd22e0a7c10a85eb0d5cc7a22bf841322 (patch) | |
tree | 7932cad0cfa77d10edbb6f526eec5cd81cb41c80 /libavformat | |
parent | 0ec1eb6906619e60b9862d7bea1438e2511f61f0 (diff) | |
download | ffmpeg-55736cfbd22e0a7c10a85eb0d5cc7a22bf841322.tar.gz |
change ff_ac3_parse_header() to take a GetBitContext instead of const char*
Originally committed as revision 12922 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/raw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index 5c188dc92b..2f7a32e673 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -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 @@ static int ac3_probe(AVProbeData *p) 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 @@ static int ac3_probe(AVProbeData *p) 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)) |