Originally committed as revision 12672 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -188,22 +188,32 @@ AVFilterFormats *avfilter_all_colorspaces(void); · 187 unmodified lines | |||
| 188 | AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b); | 188 | AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b); |
| 189 | 189 | ||
| 190 | /** | 190 | /** |
| 191 | * Adds *ref as a new reference to f. | 191 | * Adds *ref as a new reference to formats. |
| 192 | * That is the pointers will point like in the ascii art below: | 192 | * That is the pointers will point like in the ascii art below: |
| 193 | * ________ | 193 | * ________ |
| 194 | * | f |<--------. | 194 | * |formats |<--------. |
| 195 | * | ____ | | | 195 | * | ____ | ____|___________________ |
| 196 | * | |refs| | __|_ | 196 | * | |refs| | | __|_ |
| 197 | * | |* * | | | | | | 197 | * | |* * | | | | | | AVFilterLink |
| 198 | * | |* *--------->|*ref| | 198 | * | |* *--------->|*ref| |
| 199 | * | |____| | |____| | 199 | * | |____| | | |____| |
| 200 | * |________| | 200 | * |________| |________________________ |
| 201 | */ | 201 | */ |
| 202 | void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref); | 202 | void avfilter_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref); |
| 203 | 203 | ||
| 204 | /** | 204 | /** |
| 205 | * Remove *ref as a reference to the format list it currently points to, | 205 | * Remove *ref as a reference to the format list it currently points to, |
| 206 | * deallocate that list if this was the last reference, and set *ref to NULL. | 206 | * deallocate that list if this was the last reference, and set *ref to NULL. |
| 207 | * | ||
| 208 | * Before After | ||
| 209 | * ________ ________ NULL | ||
| 210 | * |formats |<--------. |formats | ^ | ||
| 211 | * | ____ | ____|________________ | ____ | ____|________________ | ||
| 212 | * | |refs| | | __|_ | |refs| | | __|_ | ||
| 213 | * | |* * | | | | | | AVFilterLink | |* * | | | | | | AVFilterLink | ||
| 214 | * | |* *--------->|*ref| | |* | | | |*ref| | ||
| 215 | * | |____| | | |____| | |____| | | |____| | ||
| 216 | * |________| |_____________________ |________| |_____________________ | ||
| 207 | */ | 217 | */ |
| 208 | void avfilter_formats_unref(AVFilterFormats **ref); | 218 | void avfilter_formats_unref(AVFilterFormats **ref); |
| 209 | 219 | ||
| @@ -211,7 +221,7 @@ void avfilter_formats_unref(AVFilterFormats **ref); · 1 unmodified line | |||
| 211 | * | 221 | * |
| 212 | * Before After | 222 | * Before After |
| 213 | * ________ ________ | 223 | * ________ ________ |
| 214 | * | f |<---------. | f |<---------. | 224 | * |formats |<---------. |formats |<---------. |
| 215 | * | ____ | ___|___ | ____ | ___|___ | 225 | * | ____ | ___|___ | ____ | ___|___ |
| 216 | * | |refs| | | | | | |refs| | | | | NULL | 226 | * | |refs| | | | | | |refs| | | | | NULL |
| 217 | * | |* *--------->|*oldref| | |* *--------->|*newref| ^ | 227 | * | |* *--------->|*oldref| | |* *--------->|*newref| ^ |