| 141 | } |
| 142 | |
| 143 | static 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 | |
| 162 | const FFOutputFormat ff_bit_muxer = { |
| 163 | .p.name = "bit", |
nothing calls this directly
no test coverage detected