History

avfilter/framepool: remove superfluous pallete buffer allocation

av_image_fill_plane_sizes() already sets sizes[1] to AVPALETTE_SIZE. Should fix memory leaks.

James Almer committed 4 years ago

Commit ee888041 parent 8fcd9d71 file · +0 −10Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/framepool.c+0−10
@@ -56,13 +56,9 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(size_t size), · 55 unmodified lines
56{56{
57 int i, ret;57 int i, ret;
58 FFFramePool *pool;58 FFFramePool *pool;
59 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
60 ptrdiff_t linesizes[4];59 ptrdiff_t linesizes[4];
61 size_t sizes[4];60 size_t sizes[4];
62 61
63 if (!desc)
64 return NULL;
65
66 pool = av_mallocz(sizeof(FFFramePool));62 pool = av_mallocz(sizeof(FFFramePool));
67 if (!pool)63 if (!pool)
68 return NULL;64 return NULL;
@@ -108,12 +104,6 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(size_t size), · 39 unmodified lines
108 goto fail;104 goto fail;
109 }105 }
110 106
111 if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
112 pool->pools[1] = av_buffer_pool_init(AVPALETTE_SIZE, alloc);
113 if (!pool->pools[1])
114 goto fail;
115 }
116
117 return pool;107 return pool;
118 108
119fail:109fail:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t