Fixes OOM when caller keeps adding frames into filtergraph that reached EOF by other means, for example EOF is signalled by other filter in filtergraph or by buffersink. (cherry picked from commit d9e41ead82)
d9e41ead82