Add av_frame_free() to release frame to avoid potential memory leaks. Fixes: 5fdb5ed613 ("FATE: add a test for sliced scaling") Signed-off-by: Jiasheng Jiang <jiashengjiangc...@gmail.com> --- Changelog:
v1 -> v2: 1. Replace frame with pd.frame_dst and pd.frame_ref in the second av_frame_free() call. --- tools/scale_slice_test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/scale_slice_test.c b/tools/scale_slice_test.c index 4480bf8569..8b5ba4f0f9 100644 --- a/tools/scale_slice_test.c +++ b/tools/scale_slice_test.c @@ -157,6 +157,7 @@ int main(int argc, char **argv) ret = av_frame_get_buffer(frame, 0); if (ret < 0) { + av_frame_free(&frame); fprintf(stderr, "Error allocating frame data\n"); return ret; } @@ -173,6 +174,8 @@ int main(int argc, char **argv) ret = ds_open(&dc, filename, 0); if (ret < 0) { + av_frame_free(&pd.frame_dst); + av_frame_free(&pd.frame_ref); fprintf(stderr, "Error opening the file\n"); return ret; } -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".