diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-02-10 18:04:32 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-02-10 18:04:32 +0000 |
commit | eac2495095dc2e61f8b7539e2f9e3f5de1f01120 (patch) | |
tree | b553c00960ed0ce79c27a58c25fc21fcaa7274b5 /libavfilter/formats.c | |
parent | 30f4baebf8cac549d40c849aa31b530a63b967d1 (diff) | |
download | ffmpeg-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.c | 12 |
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; + } +} + |