aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-02-15 21:39:32 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-02-15 21:39:32 +0000
commite3065c8b595c31b8880d5cd9597f087d2ab0b0f7 (patch)
treefca285658dae34dbdb5fd073b29fac27d0d2ffd8 /libavfilter/avfilter.c
parent07d0bba50710abf8af975a40c97a7ac18be8482c (diff)
downloadffmpeg-e3065c8b595c31b8880d5cd9597f087d2ab0b0f7.tar.gz
Need to be careful when dealing with references.
Commited in SoC by Bobby Bingham on 2007-12-20 23:38:49 Originally committed as revision 12029 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 53ca831026..f47ffebc06 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -99,6 +99,8 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
unsigned in, unsigned out)
{
+ AVFilterFormats *formats;
+
av_log(NULL, AV_LOG_INFO, "auto-inserting filter '%s'\n",
filt->filter->name);
@@ -116,10 +118,9 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
/* if any information on supported colorspaces already exists on the
* link, we need to preserve that */
- if(link->out_formats) {
- filt->outputs[out]->out_formats = link->out_formats;
- link->out_formats = NULL;
- }
+ if((formats = link->out_formats))
+ avfilter_formats_changeref(&link->out_formats,
+ &filt->outputs[out]->out_formats);
return 0;
}