diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-06-06 13:20:17 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-02-07 18:27:21 +0100 |
commit | a25dac976a4478331e4db86d44c3db4456c93eff (patch) | |
tree | be0638f8ebcb9e00dfdad10a73d0fc5ccee03293 /libavformat | |
parent | 71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5 (diff) | |
download | ffmpeg-a25dac976a4478331e4db86d44c3db4456c93eff.tar.gz |
Use bitstream_init8() where appropriate
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/h261dec.c | 2 | ||||
-rw-r--r-- | libavformat/mov.c | 2 | ||||
-rw-r--r-- | libavformat/movenc.c | 4 | ||||
-rw-r--r-- | libavformat/mpegts.c | 2 | ||||
-rw-r--r-- | libavformat/oggparseflac.c | 2 | ||||
-rw-r--r-- | libavformat/oggparsetheora.c | 2 | ||||
-rw-r--r-- | libavformat/rdt.c | 2 | ||||
-rw-r--r-- | libavformat/rtpdec_latm.c | 2 | ||||
-rw-r--r-- | libavformat/rtpdec_mpeg4.c | 2 | ||||
-rw-r--r-- | libavformat/rtpdec_qt.c | 2 | ||||
-rw-r--r-- | libavformat/rtpenc_h263_rfc2190.c | 2 |
11 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/h261dec.c b/libavformat/h261dec.c index d8a2cecc77..54202945ca 100644 --- a/libavformat/h261dec.c +++ b/libavformat/h261dec.c @@ -34,7 +34,7 @@ static int h261_probe(AVProbeData *p) int src_fmt=0; BitstreamContext bc; - bitstream_init(&bc, p->buf, p->buf_size * 8); + bitstream_init8(&bc, p->buf, p->buf_size); for(i=0; i<p->buf_size*8; i++){ if ((code & 0x01ff0000) || !(code & 0xff00)) { diff --git a/libavformat/mov.c b/libavformat/mov.c index 9afd0202ca..2810960e87 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2138,7 +2138,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) return ret; } - bitstream_init(&bc, buf, 8 * num_bytes); + bitstream_init8(&bc, buf, num_bytes); for (i = 0; i < entries && !pb->eof_reached; i++) { sc->sample_sizes[i] = bitstream_read(&bc, field_size); diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 440370e259..840190dbfa 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -252,7 +252,7 @@ static int mov_write_ac3_tag(AVIOContext *pb, MOVTrack *track) avio_wb32(pb, 11); ffio_wfourcc(pb, "dac3"); - bitstream_init(&bc, track->vos_data + 4, (track->vos_len - 4) * 8); + bitstream_init8(&bc, track->vos_data + 4, track->vos_len - 4); fscod = bitstream_read(&bc, 2); frmsizecod = bitstream_read(&bc, 6); bsid = bitstream_read(&bc, 5); @@ -470,7 +470,7 @@ static int mov_write_dvc1_structs(MOVTrack *track, uint8_t *buf) if (size <= 0) continue; unescaped_size = vc1_unescape_buffer(start + 4, size, unescaped); - bitstream_init(&bc, unescaped, 8 * unescaped_size); + bitstream_init8(&bc, unescaped, unescaped_size); if (AV_RB32(start) == VC1_CODE_SEQHDR) { int profile = bitstream_read(&bc, 2); if (profile != PROFILE_ADVANCED) { diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 5024404111..dc9339fa3e 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -742,7 +742,7 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl, int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0; int dts_flag = -1, cts_flag = -1; int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE; - bitstream_init(&bc, buf, buf_size * 8); + bitstream_init8(&bc, buf, buf_size); if (sl->use_au_start) au_start_flag = bitstream_read_bit(&bc); diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c index 90b1495c51..0946a3b7cf 100644 --- a/libavformat/oggparseflac.c +++ b/libavformat/oggparseflac.c @@ -41,7 +41,7 @@ flac_header (AVFormatContext * s, int idx) if (os->buf[os->pstart] == 0xff) return 0; - bitstream_init(&bc, os->buf + os->pstart, os->psize * 8); + bitstream_init8(&bc, os->buf + os->pstart, os->psize); bitstream_skip(&bc, 1); /* metadata_last */ mdt = bitstream_read(&bc, 7); diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index da47a0cd89..d9992fab9c 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -63,7 +63,7 @@ static int theora_header(AVFormatContext *s, int idx) BitstreamContext bc; AVRational timebase; - bitstream_init(&bc, os->buf + os->pstart, os->psize * 8); + bitstream_init8(&bc, os->buf + os->pstart, os->psize); /* 0x80"theora" */ bitstream_skip(&bc, 7 * 8); diff --git a/libavformat/rdt.c b/libavformat/rdt.c index da5ff59c22..825e4f1355 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -262,7 +262,7 @@ ff_rdt_parse_header(const uint8_t *buf, int len, * [2] http://www.wireshark.org/docs/dfref/r/rdt.html and * http://anonsvn.wireshark.org/viewvc/trunk/epan/dissectors/packet-rdt.c */ - bitstream_init(&bc, buf, len << 3); + bitstream_init8(&bc, buf, len); len_included = bitstream_read_bit(&bc); need_reliable = bitstream_read_bit(&bc); set_id = bitstream_read(&bc, 5); diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index bb826269b0..9893aeba9b 100644 --- a/libavformat/rtpdec_latm.c +++ b/libavformat/rtpdec_latm.c @@ -103,7 +103,7 @@ static int parse_fmtp_config(AVStream *st, const char *value) if (!config) return AVERROR(ENOMEM); ff_hex_to_data(config, value); - bitstream_init(&bc, config, len * 8); + bitstream_init8(&bc, config, len); audio_mux_version = bitstream_read(&bc, 1); same_time_framing = bitstream_read(&bc, 1); bitstream_skip(&bc, 6); /* num_sub_frames */ diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c index b3cd6c9404..2a7e54aabc 100644 --- a/libavformat/rtpdec_mpeg4.c +++ b/libavformat/rtpdec_mpeg4.c @@ -136,7 +136,7 @@ static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf, int len) if (len < data->au_headers_length_bytes) return AVERROR_INVALIDDATA; - bitstream_init(&bctx, buf, data->au_headers_length_bytes * 8); + bitstream_init8(&bctx, buf, data->au_headers_length_bytes); /* XXX: Wrong if optional additional sections are present (cts, dts etc...) */ au_header_size = data->sizelength + data->indexlength; diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c index 2c0f8188b6..e6c586fe50 100644 --- a/libavformat/rtpdec_qt.c +++ b/libavformat/rtpdec_qt.c @@ -72,7 +72,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, * The RTP payload is described in: * http://developer.apple.com/quicktime/icefloe/dispatch026.html */ - bitstream_init(&bc, buf, len << 3); + bitstream_init8(&bc, buf, len); ffio_init_context(&pb, buf, len, 0, NULL, NULL, NULL, NULL); if (len < 4) diff --git a/libavformat/rtpenc_h263_rfc2190.c b/libavformat/rtpenc_h263_rfc2190.c index 750a52bcd8..3b3479aeb2 100644 --- a/libavformat/rtpenc_h263_rfc2190.c +++ b/libavformat/rtpenc_h263_rfc2190.c @@ -112,7 +112,7 @@ void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size, s->timestamp = s->cur_timestamp; - bitstream_init(&bc, buf, size * 8); + bitstream_init8(&bc, buf, size); if (bitstream_read(&bc, 22) == 0x20) { /* Picture Start Code */ info.tr = bitstream_read(&bc, 8); bitstream_skip(&bc, 2); /* PTYPE start, H.261 disambiguation */ |