Commit fce30d8d authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi: copy palette in start_frame()

Fix -vf copy with pal8 format.
parent f2ee0656
......@@ -230,6 +230,10 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
link->cur_buf = avfilter_get_video_buffer(link, dst->min_perms, link->w, link->h);
link->src_buf = picref;
avfilter_copy_buffer_ref_props(link->cur_buf, link->src_buf);
/* copy palette if required */
if (av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PAL)
memcpy(link->cur_buf->data[1], link->src_buf-> data[1], AVPALETTE_SIZE);
}
else
link->cur_buf = picref;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment