Lines Matching refs:rtp_h261_ctx
46 static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx, in h261_handle_packet() argument
55 if (rtp_h261_ctx->buf && rtp_h261_ctx->timestamp != *timestamp) { in h261_handle_packet()
56 ffio_free_dyn_buf(&rtp_h261_ctx->buf); in h261_handle_packet()
57 rtp_h261_ctx->endbyte_bits = 0; in h261_handle_packet()
97 if (!rtp_h261_ctx->buf) { in h261_handle_packet()
100 res = avio_open_dyn_buf(&rtp_h261_ctx->buf); in h261_handle_packet()
104 rtp_h261_ctx->timestamp = *timestamp; in h261_handle_packet()
112 if (rtp_h261_ctx->endbyte_bits || sbit) { in h261_handle_packet()
113 if (rtp_h261_ctx->endbyte_bits == sbit) { in h261_handle_packet()
114 rtp_h261_ctx->endbyte |= buf[0] & (0xff >> sbit); in h261_handle_packet()
115 rtp_h261_ctx->endbyte_bits = 0; in h261_handle_packet()
118 avio_w8(rtp_h261_ctx->buf, rtp_h261_ctx->endbyte); in h261_handle_packet()
124 if (rtp_h261_ctx->endbyte_bits) { in h261_handle_packet()
125 rtp_h261_ctx->endbyte |= get_bits(&gb, 8 - rtp_h261_ctx->endbyte_bits); in h261_handle_packet()
126 avio_w8(rtp_h261_ctx->buf, rtp_h261_ctx->endbyte); in h261_handle_packet()
129 avio_w8(rtp_h261_ctx->buf, get_bits(&gb, 8)); in h261_handle_packet()
130 rtp_h261_ctx->endbyte_bits = get_bits_left(&gb); in h261_handle_packet()
131 if (rtp_h261_ctx->endbyte_bits) in h261_handle_packet()
132 rtp_h261_ctx->endbyte = get_bits(&gb, rtp_h261_ctx->endbyte_bits) << in h261_handle_packet()
133 (8 - rtp_h261_ctx->endbyte_bits); in h261_handle_packet()
140 avio_write(rtp_h261_ctx->buf, buf, len - 1); in h261_handle_packet()
141 rtp_h261_ctx->endbyte_bits = 8 - ebit; in h261_handle_packet()
142 rtp_h261_ctx->endbyte = buf[len - 1] & (0xff << ebit); in h261_handle_packet()
144 avio_write(rtp_h261_ctx->buf, buf, len); in h261_handle_packet()
153 if (rtp_h261_ctx->endbyte_bits) in h261_handle_packet()
154 avio_w8(rtp_h261_ctx->buf, rtp_h261_ctx->endbyte); in h261_handle_packet()
155 rtp_h261_ctx->endbyte_bits = 0; in h261_handle_packet()
158 res = ff_rtp_finalize_packet(pkt, &rtp_h261_ctx->buf, st->index); in h261_handle_packet()