MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / write_packet

Function write_packet

libavformat/bit.c:143–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static int write_packet(AVFormatContext *s, AVPacket *pkt)
144{
145 AVIOContext *pb = s->pb;
146 GetBitContext gb;
147 int i;
148
149 if (pkt->size != 10)
150 return AVERROR(EINVAL);
151
152 avio_wl16(pb, SYNC_WORD);
153 avio_wl16(pb, 8 * pkt->size);
154
155 init_get_bits(&gb, pkt->data, 8 * pkt->size);
156 for (i = 0; i < 8 * pkt->size; i++)
157 avio_wl16(pb, get_bits1(&gb) ? BIT_1 : BIT_0);
158
159 return 0;
160}
161
162const FFOutputFormat ff_bit_muxer = {
163 .p.name = "bit",

Callers

nothing calls this directly

Calls 3

avio_wl16Function · 0.85
init_get_bitsFunction · 0.85
get_bits1Function · 0.85

Tested by

no test coverage detected