1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swscale/utils: Allow sws_setColorspaceDetails() to use the tables from sws_getColorspaceDetails()

Previously this would have lead to a memcpy(a,a) which violates the
requirement of non overlapping src and dst.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-17 17:21:13 +02:00
parent 0988709673
commit aec91de549

View File

@ -960,8 +960,8 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
{
const AVPixFmtDescriptor *desc_dst;
const AVPixFmtDescriptor *desc_src;
memcpy(c->srcColorspaceTable, inv_table, sizeof(int) * 4);
memcpy(c->dstColorspaceTable, table, sizeof(int) * 4);
memmove(c->srcColorspaceTable, inv_table, sizeof(int) * 4);
memmove(c->dstColorspaceTable, table, sizeof(int) * 4);
handle_formats(c);
desc_dst = av_pix_fmt_desc_get(c->dstFormat);