@@ -61,6 +61,7 @@ version <next>:
- shear filter
- kirsch filter
- colortemperature filter
+- GIF support in FLAC
version 4.3:
@@ -151,11 +151,16 @@ static int flac_write_picture(struct AVFormatContext *s, AVPacket *pkt)
avio_wb32(pb, st->codecpar->width);
avio_wb32(pb, st->codecpar->height);
+
if ((pixdesc = av_pix_fmt_desc_get(st->codecpar->format)))
avio_wb32(pb, av_get_bits_per_pixel(pixdesc));
else
avio_wb32(pb, 0);
- avio_wb32(pb, 0);
+
+ if (st->codecpar->format == AV_PIX_FMT_PAL8)
+ avio_wb32(pb, AVPALETTE_COUNT);
+ else
+ avio_wb32(pb, 0);
avio_wb32(pb, pkt->size);
avio_write(pb, pkt->data, pkt->size);
@@ -218,9 +223,6 @@ static int flac_init(struct AVFormatContext *s)
if (!(st->disposition & AV_DISPOSITION_ATTACHED_PIC)) {
av_log(s, AV_LOG_WARNING, "Video stream #%d is not an attached picture. Ignoring\n", i);
continue;
- } else if (st->codecpar->codec_id == AV_CODEC_ID_GIF) {
- av_log(s, AV_LOG_ERROR, "GIF image support is not implemented.\n");
- return AVERROR_PATCHWELCOME;
} else if (!c->write_header) {
av_log(s, AV_LOG_ERROR, "Can't write attached pictures without a header.\n");
return AVERROR(EINVAL);