[FFmpeg-cvslog] r11894 - trunk/libavfilter/formats.c

vitor subversion
Sun Feb 10 19:04:33 CET 2008


Author: vitor
Date: Sun Feb 10 19:04:32 2008
New Revision: 11894

Log:
Need to be careful when dealing with references.



Modified:
   trunk/libavfilter/formats.c

Modified: trunk/libavfilter/formats.c
==============================================================================
--- trunk/libavfilter/formats.c	(original)
+++ trunk/libavfilter/formats.c	Sun Feb 10 19:04:32 2008
@@ -134,3 +134,15 @@ void avfilter_formats_unref(AVFilterForm
     *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;
+    }
+}
+




More information about the ffmpeg-cvslog mailing list