[FFmpeg-devel] [PATCH] avcodec: add SMC encoder

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Aug 17 19:35:46 EEST 2021


Paul B Mahol:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> +    bytestream2_init_writer(&s->pb, pkt->data, pkt->size);
> +
> +    bytestream2_put_be32(&s->pb, 0x00);
> +
> +    pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE);

Missing check for allocation failure.

> +    memcpy(pal, frame->data[1], AVPALETTE_SIZE);
> +
> +    smc_encode_stream(s, pict);
> +
> +    av_shrink_packet(pkt, bytestream2_tell_p(&s->pb));
> +


More information about the ffmpeg-devel mailing list