mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
30f4baebf8
commit
eac2495095
@ -134,3 +134,15 @@ void avfilter_formats_unref(AVFilterFormats **ref)
|
|||||||
*ref = NULL;
|
*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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user