Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-07 03:02:38 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-05-07 03:02:38 +0400
commitc34cb130b6bf3e957484fd236c1ba477720882c0 (patch)
tree0d59b7cab293782014e6674f9e35c672fba37ef3 /libavfilter/avfilter.c
parent21d84246d522d8f1b2435bb64089ca0098379680 (diff)
avfilter: dont use AVFilterLink as priv for pictures as its freed too early.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 0518e6d6c2..72e0a87f8e 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -73,15 +73,10 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
static void store_in_pool(AVFilterBufferRef *ref)
{
int i;
- AVFilterLink *link= ref->buf->priv;
- AVFilterPool *pool;
+ AVFilterPool *pool= ref->buf->priv;
av_assert0(ref->buf->data[0]);
- if(!link->pool)
- link->pool = av_mallocz(sizeof(AVFilterPool));
- pool= link->pool;
-
if(pool->count == POOL_SIZE){
AVFilterBufferRef *ref1= pool->pic[0];
av_freep(&ref1->video);
@@ -685,7 +680,6 @@ void avfilter_free(AVFilterContext *filter)
if ((link = filter->inputs[i])) {
if (link->src)
link->src->outputs[link->srcpad - link->src->output_pads] = NULL;
- av_freep(&link->pool);
avfilter_formats_unref(&link->in_formats);
avfilter_formats_unref(&link->out_formats);
}
@@ -695,7 +689,6 @@ void avfilter_free(AVFilterContext *filter)
if ((link = filter->outputs[i])) {
if (link->dst)
link->dst->inputs[link->dstpad - link->dst->input_pads] = NULL;
- av_freep(&link->pool);
avfilter_formats_unref(&link->in_formats);
avfilter_formats_unref(&link->out_formats);
}