mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-28 03:18:55 +08:00
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
This commit is contained in:
@ -99,6 +99,8 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
|
|||||||
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
|
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
|
||||||
unsigned in, unsigned out)
|
unsigned in, unsigned out)
|
||||||
{
|
{
|
||||||
|
AVFilterFormats *formats;
|
||||||
|
|
||||||
av_log(NULL, AV_LOG_INFO, "auto-inserting filter '%s'\n",
|
av_log(NULL, AV_LOG_INFO, "auto-inserting filter '%s'\n",
|
||||||
filt->filter->name);
|
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
|
/* if any information on supported colorspaces already exists on the
|
||||||
* link, we need to preserve that */
|
* link, we need to preserve that */
|
||||||
if(link->out_formats) {
|
if((formats = link->out_formats))
|
||||||
filt->outputs[out]->out_formats = link->out_formats;
|
avfilter_formats_changeref(&link->out_formats,
|
||||||
link->out_formats = NULL;
|
&filt->outputs[out]->out_formats);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user