mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
lavu/frame: fix malloc error path in av_frame_copy_props()
The error path frees all side data, but forgets to reset the side data count. This can blow up later in av_frame_unref() and free_side_data(). Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4fa42e04ed
commit
a400edbb6d
@ -503,6 +503,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
|
|||||||
free_side_data(&dst->side_data[i]);
|
free_side_data(&dst->side_data[i]);
|
||||||
}
|
}
|
||||||
av_freep(&dst->side_data);
|
av_freep(&dst->side_data);
|
||||||
|
dst->nb_side_data = 0;
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
memcpy(sd_dst->data, sd_src->data, sd_src->size);
|
memcpy(sd_dst->data, sd_src->data, sd_src->size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user