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

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
5656 {
5757 int i, ret;
5858 FFFramePool *pool;
59− const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
6059 ptrdiff_t linesizes[4];
6160 size_t sizes[4];
6261
63− if (!desc)
64− return NULL;
65−
6662 pool = av_mallocz(sizeof(FFFramePool));
6763 if (!pool)
6864 return NULL;
@@ -108,12 +104,6 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(size_t size), · 39 unmodified lines
108104 goto fail;
109105 }
110106
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−
117107 return pool;
118108
119109 fail:

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