uint32_t timestamp;
};
-static av_cold PayloadContext *h261_new_context(void)
-{
- return av_mallocz(sizeof(PayloadContext));
-}
-
static void h261_free_dyn_buffer(AVIOContext **dyn_buf)
{
uint8_t *ptr_dyn_buffer;
av_free(pl_ctx);
}
-static av_cold int h261_init(AVFormatContext *ctx, int st_index,
- PayloadContext *data)
-{
- if (st_index < 0)
- return 0;
-
- ctx->streams[st_index]->need_parsing = AVSTREAM_PARSE_FULL;
-
- return 0;
-}
-
static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx,
AVStream *st, AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, uint16_t seq,
.enc_name = "H261",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H261,
- .init = h261_init,
- .alloc = h261_new_context,
+ .need_parsing = AVSTREAM_PARSE_FULL,
+ .priv_data_size = sizeof(PayloadContext),
.free = h261_free_context,
.parse_packet = h261_handle_packet,
.static_payload_id = 31,