[FFmpeg-devel] [PATCH v4 1/2 v2] lavf/avienc: Add support for palette side data packets

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 28 13:11:29 CET 2016


On Sun, Feb 28, 2016 at 12:53:18PM +0100, Mats Peterson wrote:
> -                avist->pal_offset = avio_tell(pb) + 40;
> +                if (pb->seekable)
> +                    avist->pal_offset = avio_tell(pb) + 40;

I don't mind, but the check seems unnecessary here?

> -    if (enc->codec_id == AV_CODEC_ID_RAWVIDEO && enc->codec_tag == 0) {
> +    if (enc->codec_id == AV_CODEC_ID_RAWVIDEO && enc->codec_tag == 0 && size) {

That is quite pedantic, but I guess in principle it would be better to
support writing a side data palette even is size is 0.
If easily possible.

> +        pal = (uint8_t *)av_packet_get_side_data(pkt, AV_PKT_DATA_PALETTE, &sd_size);

Hm, why the cast? That seems to be the return type of that function
already...
I believe I at least have no further comments.


More information about the ffmpeg-devel mailing list