aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-02-10 18:04:32 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-02-10 18:04:32 +0000
commiteac2495095dc2e61f8b7539e2f9e3f5de1f01120 (patch)
treeb553c00960ed0ce79c27a58c25fc21fcaa7274b5 /libavfilter/formats.c
parent30f4baebf8cac549d40c849aa31b530a63b967d1 (diff)
downloadffmpeg-eac2495095dc2e61f8b7539e2f9e3f5de1f01120.tar.gz
Need to be careful when dealing with references.
Commited in SoC by Bobby Bingham Originally committed as revision 11894 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 021e18abe7..3748030c0e 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -134,3 +134,15 @@ void avfilter_formats_unref(AVFilterFormats **ref)
*ref = NULL;
}
+void avfilter_formats_changeref(AVFilterFormats **oldref,
+ AVFilterFormats **newref)
+{
+ int idx;
+
+ if((idx = find_ref_index(oldref)) >= 0) {
+ (*oldref)->refs[idx] = newref;
+ *newref = *oldref;
+ *oldref = NULL;
+ }
+}
+