On 02/13/2016 11:22 AM, Michael Niedermayer wrote:
On Sat, Feb 13, 2016 at 06:01:21AM +0100, Mats Peterson wrote:
On 02/13/2016 05:39 AM, Mats Peterson wrote:
On 02/13/2016 12:51 AM, Michael Niedermayer wrote:
+ if (context->has_pkt_pal) {
+ memcpy(context->palette->data,
+ avpkt->data + avpkt->size - AVPALETTE_SIZE,
AVPALETTE_SIZE);
This is incorrect, the 8bit palette in nut can have any number of
entries up to 256, this assumes its fixed 256
I had absolutely no idea, Michael. I'm doing my best ;) It would be much
easier and more consequent if it used AVPALETTE_SIZE, though.
Once again, how are we supposed to know how many colors the palette
consists of at the end of avpkt->data?
palette size = packet size - width*height
Nope. You have to take the stride in account as well, not just the width
and height, and it varies in nut, depending on whether you use "-vcodec
copy" or "-vcodec rawvideo".
Mats
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel